Created attachment 477295 [details] Patch trash-empty command to respect optional days argument Description of problem: trash-empty ignores its optional [days] argument, causing it to delete more than intended (in fact, everything) from the trash even when a minimum age is specified. The attached patch fixes handling of trash-empty's [days] argument. Version-Release number of selected component (if applicable): 0.11.3-0.1.r315 How reproducible: % date Sun Feb 6 07:31:03 EST 2011 % trash-list 2011-02-06 07:22:34 <path>/trashcli 2011-01-06 07:22:43 <path>/build % trash-empty 7 # Should remove contents at least 7 days old Actual results: %trash-list % Expected results: % trash-list 2011-02-06 07:22:34 <path>/trashcli % trash-empty % trash-list % Additional info: This has been reported (by someone else) to the upstream google code project as issue #59, but so far has not been fixed. http://code.google.com/p/trash-cli/issues/detail?id=59
trash-cli-0.11.3-0.2.r315.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/trash-cli-0.11.3-0.2.r315.fc14
trash-cli-0.11.3-0.2.r315.fc14 has been pushed to the Fedora 14 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update trash-cli'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/trash-cli-0.11.3-0.2.r315.fc14
Created attachment 477398 [details] Updated patch to correct trash-empty handling of [days] argument Whoops! Not quite there yet. Entirely my fault... many apologies. In testing the new build, I caught a further issue with trash-empty that I hadn't noticed before. My first patch inadvertently exposes it. If the argument passed to [days] is invalid, trash-empty will output usage information, but then continues right through to perform the deletion as if no argument had been passed. This results, once again, in an overzealous removal of all trash: contents. % trash-list 2011-02-07 06:41:21 <path>/week06b.odp 2011-02-07 06:41:21 <path>/week06b.ppt % trash-empty 0.5 Usage: trash-empty [days] % trash-list % ...Attaching a replacement patch which fixes this issue, as well.
trash-cli-0.11.3-0.2.r315.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
*** Bug 692732 has been marked as a duplicate of this bug. ***