mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Tweak epub: Warning to close open files.
This commit is contained in:
parent
2f6fa5c8a8
commit
314b212b59
@ -32,7 +32,7 @@
|
|||||||
<string>&Explode ePub</string>
|
<string>&Explode ePub</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset>
|
<iconset resource="../../../../resources/images.qrc">
|
||||||
<normaloff>:/images/wizard.png</normaloff>:/images/wizard.png</iconset>
|
<normaloff>:/images/wizard.png</normaloff>:/images/wizard.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@ -49,7 +49,7 @@
|
|||||||
<string>&Rebuild ePub</string>
|
<string>&Rebuild ePub</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset>
|
<iconset resource="../../../../resources/images.qrc">
|
||||||
<normaloff>:/images/exec.png</normaloff>:/images/exec.png</iconset>
|
<normaloff>:/images/exec.png</normaloff>:/images/exec.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
<string>&Cancel</string>
|
<string>&Cancel</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset>
|
<iconset resource="../../../../resources/images.qrc">
|
||||||
<normaloff>:/images/window-close.png</normaloff>:/images/window-close.png</iconset>
|
<normaloff>:/images/window-close.png</normaloff>:/images/window-close.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@ -71,7 +71,7 @@
|
|||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Explode the ePub to display contents in a file browser window. To tweak individual files, right-click, then 'Open with...' your editor of choice. When tweaks are complete, close the file browser window. Rebuild the ePub, updating your calibre library.</string>
|
<string><p>Explode the ePub to display contents in a file browser window. To tweak individual files, right-click, then 'Open with...' your editor of choice. When tweaks are complete, close the file browser window <b>and the editor windows you used to edit files in the epub</b>.</p><p>Rebuild the ePub, updating your calibre library.</p></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
@ -1147,7 +1147,7 @@ class ZipFile:
|
|||||||
|
|
||||||
self._writecheck(zinfo)
|
self._writecheck(zinfo)
|
||||||
self._didModify = True
|
self._didModify = True
|
||||||
fp = open(filename, "rb")
|
with open(filename, "rb") as fp:
|
||||||
# Must overwrite CRC and sizes with correct data later
|
# Must overwrite CRC and sizes with correct data later
|
||||||
zinfo.CRC = CRC = 0
|
zinfo.CRC = CRC = 0
|
||||||
zinfo.compress_size = compress_size = 0
|
zinfo.compress_size = compress_size = 0
|
||||||
@ -1168,7 +1168,6 @@ class ZipFile:
|
|||||||
buf = cmpr.compress(buf)
|
buf = cmpr.compress(buf)
|
||||||
compress_size = compress_size + len(buf)
|
compress_size = compress_size + len(buf)
|
||||||
self.fp.write(buf)
|
self.fp.write(buf)
|
||||||
fp.close()
|
|
||||||
if cmpr:
|
if cmpr:
|
||||||
buf = cmpr.flush()
|
buf = cmpr.flush()
|
||||||
compress_size = compress_size + len(buf)
|
compress_size = compress_size + len(buf)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user