[Haskell-cafe] How to get a file path to the program invoked?

Ozgur Akgun ozgurakgun at gmail.com
Mon Dec 5 16:05:53 CET 2011


Hi.

On 5 December 2011 14:53, dokondr <dokondr at gmail.com> wrote:
>
> Main System.Environment.Executable System.FilePath> "/abc" </> "/"
> "/"
>
> Instead of getting "/abc/" I get "/". What am I doing wrong?


It thinks the second path is an absolute path.

"Combine two paths, if the second path isAbsolute, then it returns the
second."

http://hackage.haskell.org/packages/archive/filepath/latest/doc/html/System-FilePath-Posix.html#v:combine

HTH,
Ozgur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111205/25bc4368/attachment.htm>


More information about the Haskell-Cafe mailing list