Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.Directory.getPermissions does not work well on Windows 7 #9

Closed
freizl opened this issue Nov 4, 2014 · 3 comments
Closed

System.Directory.getPermissions does not work well on Windows 7 #9

freizl opened this issue Nov 4, 2014 · 3 comments
Labels
type: a-bug The described behavior is not working as intended.

Comments

@freizl
Copy link

freizl commented Nov 4, 2014

It works well for following code

System.Directory.getPermissions "/path/to/somewhere"

However getting error with this:

System.Directory.getPermissions "/path/to/somewhere/"
*** Exception: getPermissions: does not exist (No such file or directory)

The only difference is the path name. It gets error when having extra trailing slash.
It looks wired.

Thanks your help.

PS: Previous discussion at https://ghc.haskell.org/trac/ghc/ticket/8342

@hvr hvr added the Win32 label Dec 17, 2014
@hvr
Copy link
Member

hvr commented Dec 17, 2014

Fwiw, on Unix systems foo and foo/ are two different things, e.g. for symlinks (one refers to the symlink, the other refers to the entity linked to).

Rufflewind added a commit to Rufflewind/directory that referenced this issue Mar 3, 2015
This fixes the issue haskell#9 where Windows fails to recognize paths that
contain trailing path separators.
@Rufflewind
Copy link
Member

The distinction doesn't exist on Linux at least, since that's what lstat is for.

I'll just drop the trailing slashes on Windows, since arguably this is just them being necessarily picky.

Rufflewind added a commit to Rufflewind/directory that referenced this issue Mar 3, 2015
@freizl
Copy link
Author

freizl commented Mar 3, 2015

👍

@Rufflewind Rufflewind added the type: a-bug The described behavior is not working as intended. label Sep 5, 2015
bgamari pushed a commit to bgamari/directory that referenced this issue Jul 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: a-bug The described behavior is not working as intended.
Projects
None yet
Development

No branches or pull requests

3 participants