0002655: Directories and files with accents characters cause failures in Windows.

svn: r12106
This commit is contained in:
Brian Matherly
2009-02-24 04:41:23 +00:00
parent bc081c401c
commit bff93f186a
8 changed files with 10 additions and 15 deletions

View File

@@ -185,7 +185,7 @@ class PackageWriter:
# during the process (i.e. when removing object)
for m_id in self.db.get_media_object_handles():
mobject = self.db.get_object_from_handle(m_id)
filename = str(Utils.media_path_full(self.db, mobject.get_path()))
filename = Utils.media_path_full(self.db, mobject.get_path())
archname = str(mobject.get_path())
if os.path.isfile(filename):
archive.add(filename, archname)

View File

@@ -523,8 +523,7 @@ class CheckIntegrity:
self.bad_photo.append(ObjectId)
def fs_ok_clicked(obj):
name = unicode(fs_top.get_filename(),
sys.getfilesystemencoding())
name = Utils.get_unicode_path(fs_top.get_filename())
if os.path.isfile(name):
obj = self.db.get_object_from_handle(ObjectId)
obj.set_path(name)

View File

@@ -399,8 +399,7 @@ class DisplayChart(ManagedWindow.ManagedWindow):
f.hide()
if status == gtk.RESPONSE_OK:
name = unicode(f.get_filename(),
sys.getfilesystemencoding())
name = Utils.get_unicode_path(f.get_filename())
doc = ODSTab(len(self.row_data))
doc.creator(self.db.get_researcher().get_name())