shellmate-extras 0.3.2 → 0.3.3
raw patch · 2 files changed
+9/−6 lines, 2 files
Files
- Control/Shell/Extract.hs +8/−5
- shellmate-extras.cabal +1/−1
Control/Shell/Extract.hs view
@@ -113,9 +113,9 @@ [dir] <- ls "." guard $ isDirectory dir inCustomTempDirectory "." $ do- mv (".." </> dir) "."+ mv (".." </> dir) ("." </> dir) files <- ls dir- mapM_ (\f -> mv (dir </> f) "..") files+ mapM_ (\f -> mv (dir </> f) (".." </> f)) files -- | Command + arguments to extract an archive file. -- Arguments must be followed immediately by the archive file name.@@ -155,6 +155,9 @@ -- | Iterate 'takeBaseName' until all extensions are gone. takeBasestName :: FilePath -> FilePath takeBasestName f- | f == f' = f- | otherwise = takeBasestName f'- where f' = takeBaseName f + | f == f' = f+ | unknownExt f = f+ | otherwise = takeBasestName f'+ where+ f' = takeBaseName f+ unknownExt f = defaultMimeLookup (T.pack f) == "application/octet-stream"
shellmate-extras.cabal view
@@ -1,5 +1,5 @@ name: shellmate-extras-version: 0.3.2+version: 0.3.3 synopsis: Extra functionality for shellmate. description: HTTP downloads and parsing for various file formats. homepage: https://github.com/valderman/shellmate