#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:39:57 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: |
-------------------------------+--------------------------------------------
Comment(by tomeu):
Add a comment as suggested by Michael:
{{{
diff --git a/misc.py b/misc.py
index b1b8144..25d99fb 100644
--- a/misc.py
+++ b/misc.py
@@ -131,16 +131,16 @@ 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():
+ # Check that the entry has a file only if it is a bundle, as
+ # jobject.file_path would cause the file to be copied if it is in
an
+ # usb stick. See https://dev.laptop.org/ticket/5744
+ 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:8>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system
More information about the Bugs
mailing list