File tree Expand file tree Collapse file tree 4 files changed +24
-5
lines changed
Expand file tree Collapse file tree 4 files changed +24
-5
lines changed Original file line number Diff line number Diff line change 11=== rmw ChangeLog ===
22
3+ 2025-10-20
4+ * (bugfix) Allow rmw to move directories to waste folder on btrfs filesystems
5+
362024-11-07
47
58 * Update ChangeLog to note btrfs cloning is supported only on Linux
Original file line number Diff line number Diff line change @@ -367,6 +367,8 @@ damage of 5000 hp. You feel satisfied.\n"));
367367 printf (_ ("%s resides within a waste folder and has been ignored\n" ),
368368 argv [file_arg ]);
369369 is_protected = 1 ;
370+ if (getenv ("RMW_FAKE_HOME" ))
371+ n_err ++ ;
370372 break ;
371373 }
372374 waste_curr = waste_curr -> next_node ;
@@ -410,7 +412,7 @@ damage of 5000 hp. You feel satisfied.\n"));
410412 int r_result = 0 ;
411413 if (cli_user_options -> want_dry_run == false)
412414 {
413- if (waste_curr -> dev_num != st_target .dev_num )
415+ if (( waste_curr -> dev_num != st_target .dev_num ) && ! S_ISDIR ( st_file_arg . st_mode ) )
414416 {
415417 int save_errno = errno ;
416418 r_result =
@@ -805,7 +807,7 @@ Please check your configuration file and permissions\
805807 st_location ,
806808 & cli_user_options );
807809
808- if (result > 1 )
810+ if (result )
809811 {
810812 dispose_waste (st_config_data .st_waste_folder_props_head );
811813 /* Don't need to print any messages here. Any warnings or errors
Original file line number Diff line number Diff line change @@ -63,12 +63,12 @@ test "$output" = "6"
6363
6464echo " $SEPARATOR "
6565echo " == rmw should refuse to move a waste folder or a file that resides within a waste folder"
66- output=" $( $RMW_TEST_CMD_STRING " $PRIMARY_WASTE_DIR " /info) "
66+ output=" $( $RMW_TEST_CMD_STRING " $PRIMARY_WASTE_DIR " /info || true ) "
6767test " ${output} " = " :warning: " $PRIMARY_WASTE_DIR " /info resides within a waste folder and has been ignored
68680 items were removed to the waste folder"
6969
7070# If the file gets removed (which it shouldn't), then the test that follows it will fail
71- $RMW_TEST_CMD_STRING " $PRIMARY_WASTE_DIR " /info/1.trashinfo
71+ $RMW_TEST_CMD_STRING " $PRIMARY_WASTE_DIR " /info/1.trashinfo || true
7272
7373echo " \n\n == Display contents of 1.trashinfo "
7474cat " $PRIMARY_WASTE_DIR " /info/1.trashinfo
Original file line number Diff line number Diff line change 2727
2828cd " $BTRFS_IMAGE_MOUNTPOINT "
2929RMW_TEST_CMD_STRING=" $BIN_DIR /rmw -c ${MESON_SOURCE_ROOT} /test/conf/btrfs_img.testrc"
30- WASTE_USED=" /tmp/rmw-loop/three/Waste"
30+
31+ SUBVOLUME_USED=" /tmp/rmw-loop/three"
32+
33+ WASTE_USED=" $SUBVOLUME_USED /Waste"
34+ if [ -d " $WASTE_USED " ]; then
35+ rm -rf " $WASTE_USED "
36+ fi
37+
38+ TEST_DIR=" $SUBVOLUME_USED /test_dir"
39+ if [ -d " $TEST_DIR " ]; then
40+ rm -rf " $TEST_DIR "
41+ fi
42+
43+ mkdir " $TEST_DIR "
44+ $RMW_TEST_CMD_STRING -v " $TEST_DIR "
3145
3246touch foo
3347$RMW_TEST_CMD_STRING foo
You can’t perform that action at this time.
0 commit comments