mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
13 lines
468 B
Diff
13 lines
468 B
Diff
|
--- original-util.py 2014-06-17 12:50:15.000000000 -0700
|
||
|
+++ util.py 2014-06-17 12:51:33.000000000 -0700
|
||
|
@@ -148,6 +148,9 @@
|
||
|
log.info("copying file %s -> %s", source, destination)
|
||
|
with zipio.open(source, 'rb') as fp_in:
|
||
|
if not dry_run:
|
||
|
+ if os.path.exists(destination):
|
||
|
+ os.unlink(destination)
|
||
|
+
|
||
|
with open(destination, 'wb') as fp_out:
|
||
|
data = fp_in.read()
|
||
|
fp_out.write(data)
|