Fix cross-device --file .patch files.
[nethome.git] / bin / hammock
index 8844203..2e6fd32 100755 (executable)
@@ -258,7 +258,7 @@ for my $file (@file) {
   newdir "$dir/file.d","mayexist";
   (my $base=$file)=~s{^.*/}{};
   my $d="$dir/file.d/$base";
-  link $file,$d or die "link $file $d: $!";
+  link $file,$d or spawn "cp -p '$file' '$d'";
   newdir "$resultid/file.d","mayexist";
   link $d,"$resultid/file.d/$base" or warn "link $file $resultid/file.d/$base: $!";
 }