* src/ImageSelect.py: Display GRAMPS ID, not DB handle
* src/WriteGedcom.py: handle image file problems when exporting svn: r3508
This commit is contained in:
parent
b163c0304d
commit
2c2655d899
@ -1,6 +1,7 @@
|
||||
2004-08-24 Don Allingham <dallingham@users.sourceforge.net>
|
||||
* src/ReadXML.py: Fix file copy problem, handle copy failure
|
||||
* src/src/ImageSelect.py: Display GRAMPS ID, not DB handle
|
||||
* src/ImageSelect.py: Display GRAMPS ID, not DB handle
|
||||
* src/WriteGedcom.py: handle image file problems when exporting
|
||||
|
||||
2004-08-24 Martin Hawlisch <loshawlos@users.sourceforge.net>
|
||||
* src/plugins/WebPage.py: web page enhancements, including
|
||||
|
@ -1029,17 +1029,21 @@ class GedcomWriter:
|
||||
photo_obj_id = photo.get_reference_handle()
|
||||
photo_obj = self.db.get_object_from_handle(photo_obj_id)
|
||||
if photo_obj and photo_obj.get_mime_type() == "image/jpeg":
|
||||
path = photo_obj.get_path ()
|
||||
print path
|
||||
if not os.path.isfile(path):
|
||||
continue
|
||||
self.writeln('1 OBJE')
|
||||
self.writeln('2 FORM jpeg')
|
||||
path = photo_obj.get_path ()
|
||||
dirname = os.path.join (self.dirname, self.images_path)
|
||||
basename = os.path.basename (path)
|
||||
self.writeln('2 FILE %s' % os.path.join(self.images_path,
|
||||
basename))
|
||||
try:
|
||||
os.mkdir (dirname)
|
||||
if not os.path.isdir(dirname):
|
||||
os.mkdir (dirname)
|
||||
except:
|
||||
pass
|
||||
continue
|
||||
dest = os.path.join (dirname, basename)
|
||||
try:
|
||||
os.link (path, dest)
|
||||
|
Loading…
Reference in New Issue
Block a user