Skip to content

Commit

Permalink
Bug fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
ch010060 committed Sep 15, 2020
1 parent 6c66c22 commit d8b2708
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
14 changes: 1 addition & 13 deletions dlsite_renamer-cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def nameChange(path, del_flag):
# 嘗試重命名
try:
# strip() 去掉字串兩邊的空格
if file_extension: # 如果是檔案
if os.path.isfile(os.path.join(path, file)): # 如果是檔案
os.rename(os.path.join(path, file),
os.path.join(path, new_name.strip()+file_extension))
else: # 如果是資料夾
Expand All @@ -269,18 +269,6 @@ def nameChange(path, del_flag):

print("*******完成!*******\n\n\n\n")


def thread_it(func, *args):
'''將函數打包進線程'''
# 建立
t = threading.Thread(target=func, args=args)
# 守護 !!!
t.setDaemon(True)
# 啟動
t.start()
# 阻塞--卡死界面!
# t.join()

def dir_path(path):
if os.path.isdir(path):
return path
Expand Down
2 changes: 1 addition & 1 deletion dlsite_renamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def nameChange():
# 嘗試重命名
try:
# strip() 去掉字串兩邊的空格
if file_extension: # 如果是檔案
if os.path.isfile(os.path.join(path, file)): # 如果是檔案
os.rename(os.path.join(path, file),
os.path.join(path, new_name.strip()+file_extension))
else: # 如果是資料夾
Expand Down

0 comments on commit d8b2708

Please sign in to comment.