From 58fd2b4dcb5ae0cee1d12e2c07ef53d1a65fcdff Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 27 Mar 2016 23:59:32 +0200 Subject: Fix downloading of URLs ending in / Signed-off-by: Florian Pritz --- fb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fb.py b/fb.py index 2f2735b..7a5df6d 100755 --- a/fb.py +++ b/fb.py @@ -622,7 +622,7 @@ class FBClient: return Paste(self.extractId(arg)) if re.match('https?://', arg): # FIXME: this does not work with URLs ending in / and it does not use content-disposition - outfile = os.path.join(self.tempdir, os.path.basename(arg)) + outfile = os.path.join(self.tempdir, os.path.basename(arg.strip("/"))) self.curlw.dl_file(arg, outfile) return File(outfile) -- cgit v1.2.3-24-g4f1b