fix move directories

This commit is contained in:
Amber 2021-09-06 13:20:42 +02:00
parent dc2b90272c
commit 5e967fb569

View File

@ -119,7 +119,7 @@ synccycle &
# exclude swp,swpx and 4913 files created by vim # exclude swp,swpx and 4913 files created by vim
inotifywait -m -r -e create -e close_write -e move -e delete --exclude "\.swp|\.swx|4913|.txt~" $LOCALPATH | while read dir action file; do inotifywait -m -r -e create -e close_write -e move -e delete --exclude "\.swp|\.swx|4913|.txt~" $LOCALPATH | while read dir action file; do
if [ $action = 'DELETE' ] || [ $action = 'DELETE,ISDIR' ] || [ $action = 'MOVED_FROM' ]; then if [ $action = 'DELETE' ] || [ $action = 'DELETE,ISDIR' ] || [ $action = 'MOVED_FROM' ] || [ $action = 'MOVED_FROM,ISDIR' ]; then
echo "Enqueue delete: $dir$file" echo "Enqueue delete: $dir$file"
flock $lock_deletes flock $lock_deletes
echo $dir$file | sed -e "s~$LOCALPATH~$REMOTERELATIVEPATH~g" | tee -a ${TMPQUEUEDELETES} echo $dir$file | sed -e "s~$LOCALPATH~$REMOTERELATIVEPATH~g" | tee -a ${TMPQUEUEDELETES}