summaryrefslogtreecommitdiffstats
path: root/fb.py
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-03-27 23:59:32 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-03-27 23:59:32 +0200
commit58fd2b4dcb5ae0cee1d12e2c07ef53d1a65fcdff (patch)
tree4ea597bac8d28fe74596fdcd2a5851aa819f7bc7 /fb.py
parentd57885c8f0d2c7fb80001be19bdcac8101506875 (diff)
Fix downloading of URLs ending in /
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'fb.py')
-rwxr-xr-xfb.py2
1 files changed, 1 insertions, 1 deletions
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)