Skip to content

Commit

Permalink
Small Bug Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pgh268400 committed Oct 28, 2022
1 parent 2e75886 commit 5af957f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions module/Nwebtoon.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,17 @@ def filename_remover(self, string):
cleaner = re.compile('<.*?>|&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-f]{1,6});')
string = re.sub(cleaner, '', string)

non_directory_letter = []
while string[-1] == '.':
string = string[:-1] # 끝에 . 제거 ex) test... -> test

if os.name == 'nt':
non_directory_letter = ['/', ':', '*',
'?', '<', '>', '|'] # 경로 금지 문자열 제거
elif os.name == 'posix':
non_directory_letter = [':', '*',
'?', '<', '>', '|'] # 경로 금지 문자열 제거
non_directory_letter = []
if os.name == 'nt':
non_directory_letter = ['/', ':', '*',
'?', '<', '>', '|'] # 경로 금지 문자열 제거
elif os.name == 'posix':
non_directory_letter = [':', '*',
'?', '<', '>', '|'] # 경로 금지 문자열 제거

for str_ in non_directory_letter:
if str_ in string:
string = string.replace(str_, "")
Expand Down

0 comments on commit 5af957f

Please sign in to comment.