0

Fixed pngnq rename error in Windows

Fixed error 183 (File already exists) in Windows when trying to use
pngnq and trying to rename "file.png.tmp" to "file.png".
This commit is contained in:
Shadark
2014-05-14 01:49:45 +02:00
parent 95de300276
commit b3f41c7928

View File

@@ -47,6 +47,7 @@ class Optimizer:
class NonAtomicOptimizer(Optimizer):
def cleanup(self, img):
os.remove(img)
os.rename(img + ".tmp", img)
def fire_and_forget(self, args, img):