Skip to content
Permalink
Browse files

2.021 safe encode conflict renaming #65

  • Loading branch information
fffonion committed Aug 3, 2019
1 parent be0ab0c commit 2f217f6458d4b05bd2aef8e0fce2412b6dc06e22
Showing with 2 additions and 1 deletion.
  1. +2 −1 xeHentai/task.py
@@ -15,6 +15,7 @@
from . import util
from .const import *
from .const import __version__
from .util.logger import safestr
if PY3K:
from queue import Queue, Empty
else:
@@ -330,7 +331,7 @@ def rename_fname(self):
os.rename(fname_to, os.path.join(tmppath, os.path.split(fname_to)[1]))
break
if _ :# if ...(1) exists, use ...(2)
print(_base)
print(safestr(_base))
_base = re.sub("\((\d+)\)$", _base, lambda x:"(%d)" % (int(x.group(1)) + 1))
else:
_base = "%s(1)" % _base

0 comments on commit 2f217f6

Please sign in to comment.
You can’t perform that action at this time.