summaryrefslogtreecommitdiff
path: root/Command/AddUrl.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-05-08 13:39:00 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-05-08 13:39:00 -0400
commit88ee184494c8c51d2c00d5c1e195eebc9f472b7d (patch)
treef2e4280a23adbfe01a5e66047440a6f24a2d7448 /Command/AddUrl.hs
parentddb66a7f8d1bd2ce626522d1d2af97e1ae5cde12 (diff)
Improve quvi 0.4 output parsing to handle cases wher there is no known filename extension. This is currently the case when using quvi with youtube. In this case, the extension ".m" will be used.
Diffstat (limited to 'Command/AddUrl.hs')
-rw-r--r--Command/AddUrl.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs
index 5defc52d9..6474f2614 100644
--- a/Command/AddUrl.hs
+++ b/Command/AddUrl.hs
@@ -178,7 +178,7 @@ startWeb relaxed optfile pathdepth s = go $ fromMaybe bad $ parseURI urlstring
pathmax <- liftIO $ fileNameLengthLimit "."
let file = flip fromMaybe optfile $
truncateFilePath pathmax $ sanitizeFilePath $
- Quvi.pageTitle page ++ "." ++ Quvi.linkSuffix link
+ Quvi.pageTitle page ++ "." ++ fromMaybe "m" (Quvi.linkSuffix link)
showStart "addurl" file
next $ performQuvi relaxed urlstring (Quvi.linkUrl link) file
#else