From bf66353ff3d64aeb7246f28471c5db9c1a91ac48 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Thu, 15 Aug 2013 02:28:15 +0200 Subject: [PATCH] Fix filenames containing / or \. --- src/Posting/QR.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index b66743322..f1f4577ba 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -559,7 +559,7 @@ QR = QR.cooldown.auto = false when 'filename' return unless @file - @file.newName = @filename + @file.newName = @filename.replace /[/\\]/g, '-' 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,