[Haskell-cafe] directory package copyFile error
olf at aatal-apotheke.de
Tue Mar 20 12:43:38 UTC 2018
not sure whether this is a bug or misusage on my part:
I'm using stack lts-9.2, which entails directory-126.96.36.199.
I have a file on a samba share, say
I read the file, modify its contents in my program and save a local copy, say
Then I try to copy the modified file back to its original place using
System.Directory.copyFile "/tmp/foo" "/mnt/remote/foo"
Sometimes the copyFile command produces an error like this:
copyFile:atomicCopyFileContents:withReplacementFile:hClose: does not exist (Host is down)
When I copy /tmp/foo to /mnt/remote/foo using the shell, everything works fine.
Does anyone have an idea what goes wrong? Internally withReplacementFile is used which indeed creates a temporary file to not risk corrupting the original. Is this maybe due to a wrong ordering of IO actions?
More information about the Haskell-Cafe