From: SourceForge.net <no...@so...> - 2006-11-16 16:31:51
|
Patches item #925645, was opened at 2004-03-29 23:57 Message generated for change (Comment added) made by sprause You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=456912&aid=925645&group_id=49630 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Open Resolution: Accepted Priority: 3 Private: No Submitted By: Sebastian Prause (sprause) Assigned to: Nikolaus Schulz (nikosch) Summary: make --output-dir=~/Mail/old work (use os.path.expanduser) Initial Comment: hi, the --output-dir option has a small issue: if using the long option, the shell won't expand the tilde (~) for the userdir. I've created a patch that does this (using os.path.expanduser) The patch is attached ---------------------------------------------------------------------- >Comment By: Sebastian Prause (sprause) Date: 2006-11-16 17:31 Message: Logged In: YES user_id=925608 Originator: YES I don't recall why I added the last expanduser call, too long ago already, sorry :) Right now, it simply looks superfluous to me. ---------------------------------------------------------------------- Comment By: Nikolaus Schulz (nikosch) Date: 2006-11-14 23:18 Message: Logged In: YES user_id=1594781 Originator: NO Hi, I'm going over the tracker items for archivemail... Thanks for your report and for the patch. Regarding the patch, I don't see what the second hunk is supposed to fix -- the mailbox names should be expanded by the shell. Mind to explain? The first hunk looks good. --- archivemail 2002-10-31 00:54:55.000000000 +0100 +++ /usr/pkg/bin/archivemail 2004-03-29 23:38:11.000000000 +0200 @@ -199,7 +199,7 @@ archive_by = "days" self.days_old_max = string.atoi(a) if o in ('-o', '--output-dir'): - self.output_dir = a + self.output_dir = os.path.expanduser(a) if o in ('-h', '-?', '--help'): print usage sys.exit(0) @@ -616,7 +616,7 @@ options.sanity_check() for mailbox_path in args: - archive(mailbox_path) + archive(os.path.expanduser(mailbox_path)) ######## errors and debug ########## ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=456912&aid=925645&group_id=49630 |