#4558 HIGH Update.: some characters in filenames in usb sticks make the datastore fail
Zarro Boogs per Child
bugtracker at laptop.org
Wed Nov 14 05:08:46 EST 2007
#4558: some characters in filenames in usb sticks make the datastore fail
------------------------+---------------------------------------------------
Reporter: tomeu | Owner: ApprovalForUpdate
Type: defect | Status: new
Priority: high | Milestone: Update.1
Component: datastore | Version:
Resolution: | Keywords:
Verified: 0 |
------------------------+---------------------------------------------------
Changes (by tomeu):
* cc: tomeu (added)
* owner: tomeu => ApprovalForUpdate
Comment:
Simple fix:
{{{
diff --git a/src/olpc/datastore/backingstore.py
b/src/olpc/datastore/backingstore.py
index 4177e05..47f2ee4 100644
--- a/src/olpc/datastore/backingstore.py
+++ b/src/olpc/datastore/backingstore.py
@@ -21,6 +21,7 @@ import time
import threading
import errno
import shutil
+import urllib
import dbus
import xapian
@@ -725,7 +726,7 @@ class InplaceFileBackingStore(FileBackingStore):
relative = source[len(self.uri)+1:]
result, count =
self.indexmanager.search(dict(filename=relative))
- mime_type = gnomevfs.get_mime_type(source)
+ mime_type =
gnomevfs.get_mime_type(urllib.quote(source))
stat = os.stat(source)
ctime =
datetime.fromtimestamp(stat.st_ctime).isoformat()
mtime =
datetime.fromtimestamp(stat.st_mtime).isoformat()
}}}
--
Ticket URL: <http://dev.laptop.org/ticket/4558#comment:11>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system
More information about the Bugs
mailing list