9650 : permission denied : change mtime to origin instead of destination.

This commit is contained in:
SNoiraud 2015-12-03 00:51:35 +01:00
parent 61b367ed84
commit 79395f14c6

View File

@ -550,12 +550,12 @@ def copy_thumbnail(report, handle, photo, region=None):
photo.get_mime_type(), photo.get_mime_type(),
region) region)
mtime = os.stat(full_path).st_mtime mtime = os.stat(full_path).st_mtime
os.utime(from_path, (mtime, mtime))
if not os.path.isfile(from_path): if not os.path.isfile(from_path):
from_path = CSS["Document"]["filename"] from_path = CSS["Document"]["filename"]
else: else:
from_path = CSS["Document"]["filename"] from_path = CSS["Document"]["filename"]
report.copy_file(from_path, to_path) report.copy_file(from_path, to_path)
os.utime(to_path, (mtime, mtime))
return to_path return to_path
''' '''