#782595 fl-cow: empty files are not unlinked when changed

Package:
fl-cow
Source:
fl-cow
Description:
copy-on-write utility
Submitter:
Martin Fritsche
Date:
2015-04-14 15:33:07 UTC
Severity:
important
#782595#5
Date:
2015-04-14 15:23:48 UTC
From:
To:
Dear Maintainer,

when creating an empty byte, making a hard link and adding content to
the copy,
the files are still hard-linked. With non-empty files it works as expected.

Example:
$ cow bash
$ touch foo
$ cp -l foo bar
$ ls -l foo bar
-rw-r--r-- 2 fritsche fritsche 0 Apr 14 17:05 bar
-rw-r--r-- 2 fritsche fritsche 0 Apr 14 17:05 foo
$ echo foo >> foo
$ ls -l foo bar
-rw-r--r-- 2 fritsche fritsche 4 Apr 14 17:05 bar
-rw-r--r-- 2 fritsche fritsche 4 Apr 14 17:05 foo
$ echo foo >> foo
$ ls -l foo bar
-rw-r--r-- 1 fritsche fritsche 4 Apr 14 17:05 bar
-rw-r--r-- 1 fritsche fritsche 8 Apr 14 17:06 foo