Turn extensions lowercase
This commit is contained in:
parent
558c3a682a
commit
377afbb3cc
@ -1,4 +1,5 @@
|
||||
import Control.Monad
|
||||
import Data.Char (toLower)
|
||||
import Text.Printf (printf)
|
||||
import Crypto.Hash.SHA1 (hash)
|
||||
import System.Environment (getArgs)
|
||||
@ -22,7 +23,7 @@ newName path = do
|
||||
hash <- take 10 <$> fileHash path
|
||||
let (file, ext) = splitExtension path
|
||||
(dir, base) = splitFileName file
|
||||
new = dir </> hash <.> ext
|
||||
new = dir </> hash <.> map toLower ext
|
||||
if null base
|
||||
then return path
|
||||
else return new
|
||||
|
Loading…
Reference in New Issue
Block a user