Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Silbe <sascha-pgp@silbe.org>2010-10-17 10:47:58 (GMT)
committer Sascha Silbe <sascha-pgp@silbe.org>2010-10-23 11:06:41 (GMT)
commite8b50bd6cc0fd47bd7f7c51007bd549afabbc2c3 (patch)
tree4034d3e65f8f415d0e1ce031bad2b5d60893ac7e
parent518f7c478fd9ea4d8bbfd6218ae699f7e14d7061 (diff)
don't delete bundles on storage media (SL #2456)HEADrefs/top-bases/t/accessibility-namesmaster
model.get_file() already wraps data store checkouts in TempFilePath. Because misc.get_bundle() unconditionally wrapped the path returned by model.get_file() in TempFilePath as well, bundles located on storage media (which are referenced by their actual location, not copied or linked) were deleted after misc.get_bundle() finished.
-rw-r--r--src/jarabe/journal/misc.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jarabe/journal/misc.py b/src/jarabe/journal/misc.py
index 4fcfc60..1817df3 100644
--- a/src/jarabe/journal/misc.py
+++ b/src/jarabe/journal/misc.py
@@ -108,21 +108,21 @@ def get_date(metadata):
def get_bundle(metadata):
try:
if is_activity_bundle(metadata):
- file_path = util.TempFilePath(model.get_file(metadata['uid']))
+ file_path = model.get_file(metadata['uid'])
if not os.path.exists(file_path):
logging.warning('Invalid path: %r', file_path)
return None
return ActivityBundle(file_path)
elif is_content_bundle(metadata):
- file_path = util.TempFilePath(model.get_file(metadata['uid']))
+ file_path = model.get_file(metadata['uid'])
if not os.path.exists(file_path):
logging.warning('Invalid path: %r', file_path)
return None
return ContentBundle(file_path)
elif is_journal_bundle(metadata):
- file_path = util.TempFilePath(model.get_file(metadata['uid']))
+ file_path = model.get_file(metadata['uid'])
if not os.path.exists(file_path):
logging.warning('Invalid path: %r', file_path)
return None