Merge pull request #147 from halo9999/bug-fix

use failed_output_folder in config instead of hard-coding
This commit is contained in:
Yoshiko 2020-03-08 20:24:21 +08:00 committed by GitHub
commit aafb493a17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,11 +145,11 @@ if __name__ == '__main__':
print('[-]' + i + ' Cannot catch the number :')
if config['common']['soft_link'] == '1':
print('[-]Link', i, 'to failed folder')
os.symlink(i, str(os.getcwd()) + '/' + 'failed/')
os.symlink(i, str(os.getcwd()) + '/' + failed_folder + '/')
else:
try:
print('[-]Move ' + i + ' to failed folder')
shutil.move(i, str(os.getcwd()) + '/' + 'failed/')
shutil.move(i, str(os.getcwd()) + '/' + failed_folder + '/')
except FileExistsError:
print('[!]File exists in failed!')
except: