forked from 0x2620/pandora
dont start filenames with .
This commit is contained in:
parent
4abbe25996
commit
d5edde92e0
1 changed files with 2 additions and 0 deletions
|
@ -10,6 +10,8 @@ def safe_filename(filename):
|
||||||
filename = filename.replace(': ', '_ ')
|
filename = filename.replace(': ', '_ ')
|
||||||
filename = filename.replace('/', '_')
|
filename = filename.replace('/', '_')
|
||||||
filename = filename.replace('\\', '_')
|
filename = filename.replace('\\', '_')
|
||||||
|
if filename.startswith('.'):
|
||||||
|
filename = '_' + filename[1:]
|
||||||
if filename.endswith('.'):
|
if filename.endswith('.'):
|
||||||
filename = filename[:-1] + '_'
|
filename = filename[:-1] + '_'
|
||||||
return filename
|
return filename
|
||||||
|
|
Loading…
Reference in a new issue