forked from openlp/openlp
I hope it finally is right.
This commit is contained in:
parent
89187ffade
commit
f117446954
@ -465,6 +465,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
allow_zip_64 = (total_size > 2147483648 + len(service_content))
|
allow_zip_64 = (total_size > 2147483648 + len(service_content))
|
||||||
log.debug(u'ServiceManager.saveFile - allowZip64 is %s' %
|
log.debug(u'ServiceManager.saveFile - allowZip64 is %s' %
|
||||||
allow_zip_64)
|
allow_zip_64)
|
||||||
|
zip = None
|
||||||
try:
|
try:
|
||||||
zip = zipfile.ZipFile(path_file_name, 'w', zipfile.ZIP_STORED,
|
zip = zipfile.ZipFile(path_file_name, 'w', zipfile.ZIP_STORED,
|
||||||
allow_zip_64)
|
allow_zip_64)
|
||||||
@ -477,9 +478,9 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
zip.write(path_from, path_from.encode(u'utf-8'))
|
zip.write(path_from, path_from.encode(u'utf-8'))
|
||||||
except IOError:
|
except IOError:
|
||||||
log.exception(u'Failed to save service to disk')
|
log.exception(u'Failed to save service to disk')
|
||||||
zip.close()
|
|
||||||
return False
|
return False
|
||||||
finally:
|
finally:
|
||||||
|
if zip:
|
||||||
zip.close()
|
zip.close()
|
||||||
self.mainwindow.addRecentFile(path_file_name)
|
self.mainwindow.addRecentFile(path_file_name)
|
||||||
self.setModified(False)
|
self.setModified(False)
|
||||||
|
Loading…
Reference in New Issue
Block a user