github.com/rclone/rclone@v1.66.1-0.20240517100346-7b89735ae726/cmd/bisync/testdata/test_rmdirs/scenario.txt (about) 1 test rmdirs 2 # Test the --remove-empty-dirs logic. 3 # Without this flag the subdir should not be deleted when empty, 4 # and deleted with the flag. 5 # 6 # After the initial setup sync: 7 # 1. Delete Path1 subdir/file20.txt 8 # 2. Run bisync without --remove-empty-dirs 9 # 3. Confirm the subdir still exists on both paths 10 # 4. Run bisync WITH --remove-empty-dirs 11 # 5. Confirm the subdir has been removed on both paths 12 13 test initial bisync 14 bisync resync 15 16 test 1. delete path1 subdir file 17 delete-file {path1/}subdir/file20.txt 18 19 test 2. run bisync without remove-empty-dirs 20 bisync 21 22 test 3. confirm the subdir still exists on both paths 23 list-dirs {path1/} 24 list-dirs {path2/} 25 26 test 4. run bisync with remove-empty-dirs 27 bisync remove-empty-dirs 28 29 test 5. confirm the subdir has been removed on both paths 30 list-dirs {path1/} 31 list-dirs {path2/}