we are on COW fs (zfs) so always save to new file
[cloudstore.git] / gearman / list_files
index 4be8768..306b7e7 100755 (executable)
@@ -6,6 +6,6 @@ while read path ; do
        if [ -e $path/.meta/files ] ; then
                cat $path/.meta/files
        else
-               find -L $path -printf "%y %s %p\n" | tee $path/.meta/files
+               find -L $path -printf "%y %s %p\n" | tee $path/.meta/files.new && mv $path/.meta/files.new $path/.meta/files
        fi
 done