LIB: fix IOError in copyFile
The destination file does not exist yet so we cannot canonicalize it's full path, only part of it.
This commit is contained in:
parent
0867c8b2e3
commit
89157bc0d9
@ -205,7 +205,8 @@ copyFile :: FilePath -- ^ source file
|
|||||||
-> IO ()
|
-> IO ()
|
||||||
copyFile from' to' = do
|
copyFile from' to' = do
|
||||||
from <- canonicalizePath from'
|
from <- canonicalizePath from'
|
||||||
to <- canonicalizePath to'
|
tod <- canonicalizePath (baseDir to')
|
||||||
|
let to = tod </> takeFileName to'
|
||||||
fileSanityThrow from
|
fileSanityThrow from
|
||||||
throwNotAbsolute to
|
throwNotAbsolute to
|
||||||
throwDirDoesExist to
|
throwDirDoesExist to
|
||||||
|
Loading…
Reference in New Issue
Block a user