Yes, /home/obraun/wiki/wikidata exists. It is the repository_path from
the config file.
I have removed the lines you mentioned and it works. I have also found
out that there was a small change in System.Directory between 1.0.1.1
and 1.0.1.2
In 1.0.1.1 the function is:
canonicalizePath :: FilePath -> IO FilePath
canonicalizePath fpath =
// lines removed
do c_realpath pInPath pOutPath
// lines removed
and starting with 1.0.1.2 it is:
do throwErrnoPathIfNull "canonicalizePath" fpath $ c_realpath
pInPath pOutPath
If I understand correctly your checks are performed BEFORE the file
upload is really done. It fails since the file is not yet there, as
you can see in this ghci-session:
GHCi, version 7.0.3:
http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Prelude> :m System.Directory
Prelude System.Directory> canonicalizePath "gitit.cabal"
Loading package old-locale-1.0.0.2 ... linking ... done.
Loading package old-time-1.0.0.6 ... linking ... done.
Loading package unix-2.4.2.0 ... linking ... done.
Loading package filepath-1.2.0.0 ... linking ... done.
Loading package directory-1.1.0.0 ... linking ... done.
"/tmp/gitit-0.8/gitit.cabal"
Prelude System.Directory> canonicalizePath "gitit.jpg"
*** Exception: gitit.jpg: canonicalizePath: does not exist (No such
file or directory)
Unfortunately I have no older ghc-version lying arround, so I cannot
test it with directory-1.0.1.1.
Oliver