aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--b4/mbox.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/b4/mbox.py b/b4/mbox.py
index 7043fa1..e3bde22 100644
--- a/b4/mbox.py
+++ b/b4/mbox.py
@@ -62,7 +62,10 @@ def get_pi_thread_by_msgid(msgid, config, cmdargs):
savefile = os.path.join(outdir, savefile)
cachedir = b4.get_cache_dir()
- cachefile = os.path.join(cachedir, '%s.pi.mbx' % urllib.parse.quote_plus(msgid))
+ base = msgid
+ if cmdargs.useproject:
+ base = '%s-%s' % (cmdargs.useproject, msgid)
+ cachefile = os.path.join(cachedir, '%s.pi.mbx' % urllib.parse.quote_plus(base))
if os.path.exists(cachefile) and not cmdargs.nocache:
logger.debug('Using cached copy: %s', cachefile)
shutil.copyfile(cachefile, savefile)