diff options
author | Nikolaus Schulz <microschulz@web.de> | 2010-07-31 16:43:07 +0200 |
---|---|---|
committer | Nikolaus Schulz <microschulz@web.de> | 2010-07-31 20:49:29 +0200 |
commit | 40ba265fde06152de837ed0dc5ee916543f376fc (patch) | |
tree | e9138b9c0cc5fad4b9588a9185c962806f7531db | |
parent | f1f34ca46e9ea81e85d6728cb7c74cb815860cca (diff) | |
download | archivemail-40ba265fde06152de837ed0dc5ee916543f376fc.tar.gz archivemail-40ba265fde06152de837ed0dc5ee916543f376fc.tar.bz2 archivemail-40ba265fde06152de837ed0dc5ee916543f376fc.zip |
Rename variables in make_archive_name()
Archive name prefixes may contain path components, thus renaming some
variables accordingly.
-rwxr-xr-x | archivemail | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/archivemail b/archivemail index 92faa2a..37b3777 100755 --- a/archivemail +++ b/archivemail @@ -1645,16 +1645,16 @@ def make_archive_name(mailbox_name): if options.archive_suffix: suffix = time.strftime(options.archive_suffix, tm) if re.match(r'imaps?://', mailbox_name.lower()): - archive_dir = "" - archive_base = mailbox_name.rsplit('/', 1)[-1] + archive_head = "" + archive_tail = mailbox_name.rsplit('/', 1)[-1] else: - archive_dir, archive_base = os.path.split(mailbox_name) + archive_head, archive_tail = os.path.split(mailbox_name) if not prefix: # Don't create hidden archives, e.g. when processing Maildir++ subfolders - archive_base = archive_base.lstrip('.') + archive_tail = archive_tail.lstrip('.') if options.output_dir: - archive_dir = options.output_dir - archive_name = os.path.join(archive_dir, prefix + archive_base + suffix) + archive_head = options.output_dir + archive_name = os.path.join(archive_head, prefix + archive_tail + suffix) return archive_name def check_sane_destdir(dir): |