Add a fake filename extension when needed.
This commit is contained in:
parent
eaf4acd832
commit
f42296483f
@ -554,6 +554,11 @@ QR =
|
|||||||
when 'filename'
|
when 'filename'
|
||||||
return unless @file
|
return unless @file
|
||||||
@file.newName = @filename
|
@file.newName = @filename
|
||||||
|
unless /\.(jpe?g|png|gif|pdf|sfw)$/i.test @filename
|
||||||
|
# 4chan will truncate the filename if it has no extension,
|
||||||
|
# but it will always replace the extension by the correct one,
|
||||||
|
# so we suffix it with '.jpg' when needed.
|
||||||
|
@file.newName += '.jpg'
|
||||||
@updateFilename()
|
@updateFilename()
|
||||||
forceSave: ->
|
forceSave: ->
|
||||||
return unless @ is QR.selected
|
return unless @ is QR.selected
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user