* src/ReadXML.py (import_data), src/WriteXML.py (export_data),
src/RelImage.py (import_media_object), src/gramps_main.py (open_example), src/plugins/Check.py (cleanup_missing_photos), src/plugins/WebPage.py (write_gallery): Change shutil.copy() calls to first call shutil.copyfile() and then try setting up bits. svn: r1652
This commit is contained in:
@ -185,7 +185,11 @@ def importData(database, filename, callback,cl=0):
|
||||
def fs_ok_clicked(obj):
|
||||
name = fs_top.get_filename()
|
||||
if os.path.isfile(name):
|
||||
shutil.copy2(name,newfile)
|
||||
shutil.copyfile(name,newfile)
|
||||
try:
|
||||
shutil.copystat(name,newfile)
|
||||
except:
|
||||
pass
|
||||
Utils.destroy_passed_object(fs_top)
|
||||
|
||||
fs_top = gtk.FileSelection("%s - GRAMPS" % _("Select file"))
|
||||
@ -210,7 +214,11 @@ def importData(database, filename, callback,cl=0):
|
||||
ObjectMap[NewMediaID].setPath(newfile)
|
||||
ObjectMap[NewMediaID].setLocal(1)
|
||||
try:
|
||||
shutil.copy2(oldfile,newfile)
|
||||
shutil.copyfile(oldfile,newfile)
|
||||
try:
|
||||
shutil.copystat(oldfile,newfile)
|
||||
except:
|
||||
pass
|
||||
except:
|
||||
if cl:
|
||||
print "Warning: media file %s was not found," \
|
||||
|
Reference in New Issue
Block a user