* src/AddMedia.py: use full paths for calculations to avoid pwd issues
* src/DbLoader.py: fix working directories * example/gramps/example.gramps: remove hard coded paths * example/gramps/data.gramps: remove hard coded paths svn: r6977
This commit is contained in:
@@ -131,20 +131,23 @@ class AddMediaObject(ManagedWindow.ManagedWindow):
|
||||
mobj.set_mime_type(None)
|
||||
else:
|
||||
filename = self.file_text.get_filename()
|
||||
|
||||
full_file = filename
|
||||
|
||||
if self.relpath.get_active():
|
||||
p = self.db.get_save_path()
|
||||
if not os.path.isdir(p):
|
||||
p = os.path.dirname(p)
|
||||
filename = Utils.relative_path(filename,p)
|
||||
|
||||
|
||||
print os.getcwd(), filename, full_file
|
||||
|
||||
if os.path.exists(filename) == 0:
|
||||
msgstr = _("Cannot import %s")
|
||||
msgstr2 = _("The filename supplied could not be found.")
|
||||
ErrorDialog(msgstr % filename, msgstr2)
|
||||
return
|
||||
|
||||
mtype = Mime.get_type(filename)
|
||||
mtype = Mime.get_type(full_file)
|
||||
if description == "":
|
||||
description = os.path.basename(filename)
|
||||
|
||||
|
Reference in New Issue
Block a user