mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 02:26:53 -07:00
add check to exception rename to not over-write exisiting. Fixes #1238
This commit is contained in:
parent
cabaa9950c
commit
fa334e6851
1 changed files with 2 additions and 0 deletions
|
@ -61,6 +61,8 @@ def strip_groups(filename):
|
|||
|
||||
|
||||
def rename_file(filename, newfilePath):
|
||||
if os.path.isfile(newfilePath):
|
||||
newfilePath = os.path.splitext(newfilePath)[0] + ".NTM" + os.path.splitext(newfilePath)[1]
|
||||
logger.debug("Replacing file name {old} with download name {new}".format
|
||||
(old=filename, new=newfilePath), "EXCEPTION")
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue