#5719 BLOC Update.: Deleting a large file from a USB stick copies it into NAND (often filling NAND)
Zarro Boogs per Child
bugtracker at laptop.org
Thu Jan 3 17:19:03 EST 2008
#5719: Deleting a large file from a USB stick copies it into NAND (often filling
NAND)
-------------------------------+--------------------------------------------
Reporter: gnu | Owner: tomeu
Type: defect | Status: new
Priority: blocker | Milestone: Update.1
Component: journal-activity | Version: Build 650
Resolution: | Keywords: review?
Verified: 0 | Blocking:
Blockedby: |
-------------------------------+--------------------------------------------
Changes (by tomeu):
* keywords: => review?
* component: datastore => journal-activity
Comment:
The journal was asking the file to the DS in order to check if it was a
bundle, as we need to uninstall the bundles before deleting them.
This patch will copy only the bundles, limiting this problem. If we want
to avoid copying the bundles at all, we need to fix #5744.
{{{
diff --git a/misc.py b/misc.py
index b1b8144..ae53137 100644
--- a/misc.py
+++ b/misc.py
@@ -131,16 +131,13 @@ def get_date(jobject):
return _('No date')
def get_bundle(jobject):
- if jobject.file_path == '':
- # Probably a download-in-progress
- return None
-
try:
- if jobject.is_activity_bundle():
+ if jobject.is_activity_bundle() and jobject.file_path:
return ActivityBundle(jobject.file_path)
- elif jobject.is_content_bundle():
+ elif jobject.is_content_bundle() and jobject.file_path:
return ContentBundle(jobject.file_path)
- elif jobject.metadata['mime_type'] ==
JournalEntryBundle.MIME_TYPE:
+ elif jobject.metadata['mime_type'] ==
JournalEntryBundle.MIME_TYPE and \
+ jobject.file_path:
return JournalEntryBundle(jobject.file_path)
else:
return None
}}}
--
Ticket URL: <http://dev.laptop.org/ticket/5719#comment:7>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system
More information about the Bugs
mailing list