Fix filenames containing / or \.
This commit is contained in:
parent
d73b3c9e39
commit
bf66353ff3
@ -559,7 +559,7 @@ QR =
|
|||||||
QR.cooldown.auto = false
|
QR.cooldown.auto = false
|
||||||
when 'filename'
|
when 'filename'
|
||||||
return unless @file
|
return unless @file
|
||||||
@file.newName = @filename
|
@file.newName = @filename.replace /[/\\]/g, '-'
|
||||||
unless /\.(jpe?g|png|gif|pdf|sfw)$/i.test @filename
|
unless /\.(jpe?g|png|gif|pdf|sfw)$/i.test @filename
|
||||||
# 4chan will truncate the filename if it has no extension,
|
# 4chan will truncate the filename if it has no extension,
|
||||||
# but it will always replace the extension by the correct one,
|
# but it will always replace the extension by the correct one,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user