Merge pull request #385 from ddtyjmyjm/ben_dev
fix program crash and wrong folder created
This commit is contained in:
4
core.py
4
core.py
@@ -34,7 +34,7 @@ def moveFailedFolder(filepath, failed_folder):
|
|||||||
root_path = str(pathlib.Path(filepath).parent)
|
root_path = str(pathlib.Path(filepath).parent)
|
||||||
file_name = pathlib.Path(filepath).name
|
file_name = pathlib.Path(filepath).name
|
||||||
destination_path = root_path + '/' + failed_folder + '/'
|
destination_path = root_path + '/' + failed_folder + '/'
|
||||||
if config.Config.soft_link():
|
if config.Config().soft_link():
|
||||||
print('[-]Create symlink to Failed output folder')
|
print('[-]Create symlink to Failed output folder')
|
||||||
os.symlink(filepath, destination_path + '/' + file_name)
|
os.symlink(filepath, destination_path + '/' + file_name)
|
||||||
else:
|
else:
|
||||||
@@ -522,7 +522,7 @@ def core_main(file_path, number_th, conf: config.Config):
|
|||||||
|
|
||||||
|
|
||||||
filepath = file_path # 影片的路径 绝对路径
|
filepath = file_path # 影片的路径 绝对路径
|
||||||
rootpath = str(pathlib.Path(filepath).parent)
|
rootpath = os.getcwd() #程序根路径
|
||||||
number = number_th
|
number = number_th
|
||||||
json_data = get_data_from_json(number, filepath, conf) # 定义番号
|
json_data = get_data_from_json(number, filepath, conf) # 定义番号
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user