2006-11-28 Alex Roitman <shura@gramps-project.org>
* src/plugins/MediaManager.py (get_rel_path): Correctly work out the drive letter for the path. svn: r7726
This commit is contained in:
parent
685c25b257
commit
48420a2845
@ -1,3 +1,7 @@
|
||||
2006-11-28 Alex Roitman <shura@gramps-project.org>
|
||||
* src/plugins/MediaManager.py (get_rel_path): Correctly work out
|
||||
the drive letter for the path.
|
||||
|
||||
2006-11-27 Alex Roitman <shura@gramps-project.org>
|
||||
* src/DbLoader.py (DbLoader.save_as): Prohibit SaveAs into the
|
||||
currently opened database.
|
||||
@ -5,8 +9,6 @@
|
||||
opened database.
|
||||
* src/GrampsDb/_WriteXML.py (dump_person_ref): Properly export
|
||||
associations.
|
||||
|
||||
2006-11-27 Alex Roitman <shura@phy.ucsf.edu>
|
||||
* src/GrampsDb/_WriteGedcom.py (write_person): Typo.
|
||||
|
||||
2006-11-27 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||
|
@ -560,6 +560,13 @@ def get_rel_path(db_dir,obj_path):
|
||||
obj_dir = os.path.dirname(os.path.normpath(obj_path))
|
||||
obj_name = os.path.basename(os.path.normpath(obj_path))
|
||||
|
||||
# If the db_dir and obj_dir are on different drives (win only)
|
||||
# then there cannot be a relative path. Return original obj_path
|
||||
(db_drive,db_dir) = os.path.splitdrive(db_dir)
|
||||
(obj_drive,obj_dir) = os.path.splitdrive(obj_dir)
|
||||
if db_drive.upper() != obj_drive.upper():
|
||||
return obj_path
|
||||
|
||||
# Get the list of dirnames for each
|
||||
db_dir_list = [word for word in db_dir.split(os.path.sep) if word]
|
||||
obj_dir_list = [word for word in obj_dir.split(os.path.sep) if word]
|
||||
|
Loading…
Reference in New Issue
Block a user