Skip to content
Snippets Groups Projects

Fix identifying snapshots with symlinks

Merged Alex Iribarren requested to merge fixcleanup into master
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -15,7 +15,7 @@ cd $SNAPS
CANDIDATES=`find . -maxdepth 1 -type d -or -type l | grep -v "\.\$" | sed 's/\.\///' | sort | awk "{if(\\$1==\\$1+0 && \\$1<$TOO_OLD)print \\$1}" | sort -r`
for f in $CANDIDATES; do
has_link=`find $DESTINATION -maxdepth 2 -lname "*/$f" -or -lname "$f" -print -quit | wc -l`
has_link=`find $DESTINATION -maxdepth 2 -lname "*/$f" -or -lname "$f" | wc -l`
if [ $has_link -eq 0 ]; then
echo " -> deleting $f ..."
rm -rf $SNAPS/$f
Loading