2 patches for trash-empty and restore-trash

2 views
Skip to first unread message

tyru

unread,
Feb 14, 2011, 10:52:12 AM2/14/11
to trash-c...@googlegroups.com
Hello list.
Here is the correct place to post a patch?

I created 2 patches.

The first patch is about trash-empty.
As iamcraig said here (http://aur.archlinux.org/packages.php?ID=19076),
trash-empty ignores given arguments and accessing index is wrong.
And I added `sys.exit(1)` in except statement
because when args[0] is not number and int() fails to convert,
also ignores arguments and remove all files in trash (regardless of
their trashed timestamp).

The second patch is about restore-trash.
When I give EOF input to restore-trash,
restore-trash will exit with stacktrace.
Inputting non-number string (e.g. "foo") results in the same.
In addition, the attached patch supports multiple files like "1 2 4".
It will remove files correspond to 1, 2, 4.

trash-empty.patch
restore-trash.patch

Andrea Francia

unread,
Feb 14, 2011, 3:35:41 PM2/14/11
to trash-c...@googlegroups.com
Thanks Tyru, 
  I try to review them for the 26 february 2011.

Thank you


--
You received this message because you are subscribed to the Google Groups "trash-cli Development" group.
To post to this group, send email to trash-c...@googlegroups.com.
To unsubscribe from this group, send email to trash-cli-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trash-cli-devel?hl=en.




--
Andrea Francia http://www.andreafrancia.it

tyru

unread,
Feb 18, 2011, 11:09:19 AM2/18/11
to trash-c...@googlegroups.com
fix a little bit of restore-trash patch.
merge all the same except statements.
restore-trash.patch

Andrea Francia

unread,
Feb 20, 2011, 10:51:36 AM2/20/11
to trash-c...@googlegroups.com, tyru
Dear Tyru,
  I uploaded a fixed version of trash-empty.

Could you provide a list of steps that will exploit the bug? I will
use they for regression testing.
Could you provide the same for the new added feature?
The bug report #59 is a good example of that.

Only those two section are important:
1) What steps will reproduce the problem?
2) What is the expected output? What do you see instead?

I will try to translate your input in automatic tests.

Reply all
Reply to author
Forward
0 new messages