fix wrong filenames for ntfs. removed double quote from filenames
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
516d0b74a1
commit
ce67407bf4
2 changed files with 2 additions and 2 deletions
|
@ -57,7 +57,7 @@ def get_chapter_list(chapters):
|
|||
# remove illegal characters etc
|
||||
def fix_name(filename):
|
||||
# remove illegal characters
|
||||
filename = re.sub("[\\\/\<\>\:\;\|\?\*\!\@]", "", filename)
|
||||
filename = re.sub('[\\\/\<\>\:\;\|\?\*\!\@"]', "", filename)
|
||||
# remove multiple dots
|
||||
filename = re.sub("([\.]{2,})", ".", filename)
|
||||
# remove dot(s) at the beginning and end of the filename
|
||||
|
|
|
@ -69,7 +69,7 @@ def test_fix_name():
|
|||
filename_in1 = "..hello?; @test1-*<>test2.cbz"
|
||||
filename_in2 = "!hello: >test1-/test2<!.cbz"
|
||||
filename_in3 = " hello test1-test2.cbz "
|
||||
filename_in4 = "hello test1-test2..cbz."
|
||||
filename_in4 = 'hello "test1"-test2..cbz.'
|
||||
# out
|
||||
filename_out = "hello test1-test2.cbz"
|
||||
assert utils.fix_name(filename_in1) == filename_out
|
||||
|
|
Loading…
Reference in a new issue