This commit is contained in:
parent
1d6f9672f6
commit
c8f6918b55
@ -21,8 +21,8 @@ hex bytes = B.unpack bytes >>= printf "%02X"
|
||||
newName :: FilePath -> IO FilePath
|
||||
newName path = do
|
||||
hash <- take 10 <$> fileHash path
|
||||
let (file, ext) = splitExtension path
|
||||
(dir, base) = splitFileName file
|
||||
let (file, ext) = splitExtension path
|
||||
(dir, base) = splitFileName file
|
||||
new = dir </> hash <.> ext
|
||||
if null base
|
||||
then return path
|
||||
|
Loading…
Reference in New Issue
Block a user