summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--b4/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 8a7cf8b..af8b23c 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -1462,7 +1462,10 @@ def get_pi_thread_by_url(t_mbx_url, savefile):
def get_pi_thread_by_msgid(msgid, savefile, useproject=None, nocache=False):
config = get_main_config()
cachedir = get_cache_dir()
- cachefile = os.path.join(cachedir, '%s.pi.mbx' % urllib.parse.quote_plus(msgid))
+ base = msgid
+ if useproject:
+ base = '%s-%s' % (useproject, msgid)
+ cachefile = os.path.join(cachedir, '%s.pi.mbx' % urllib.parse.quote_plus(base))
if os.path.exists(cachefile) and not nocache:
logger.debug('Using cached copy: %s', cachefile)
shutil.copyfile(cachefile, savefile)