From: Dobrica Pavlinusic Date: Wed, 11 Apr 2012 18:25:31 +0000 (+0200) Subject: we are on COW fs (zfs) so always save to new file X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=334e3e84d68e1cdf18f8550920d6c062c6833f06;p=cloudstore.git we are on COW fs (zfs) so always save to new file This also has nice side-effect that we won't destroy last copy if for some reason we can't generate new one --- diff --git a/gearman/list_files b/gearman/list_files index 4be8768..306b7e7 100755 --- a/gearman/list_files +++ b/gearman/list_files @@ -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