Ticket #5482 (closed bug: worksforme)

Opened 21 months ago

Last modified 21 months ago

isSymbolicLink doesn't work

Reported by: DmitryBespalov Owned by:
Priority: normal Milestone:
Component: libraries/unix Version: 7.2.1
Keywords: isSymbolicLink Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: None/Unknown Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

This function from System.Posix.Files (unix-2.5.0.0) always returns False for symlinks on my linux os (2.6.39-gentoo-r3). GHC version 7.0.4. What's wrong?

Change History

Changed 21 months ago by igloo

  • status changed from new to closed
  • resolution set to worksforme

I suspect you're using getFileStatus rather than getSymbolicLinkStatus. If not, please reopen and give a complete testcase.

Changed 21 months ago by daniel.is.fischer

Perhaps the docs for getFileStatus should mention that symbolic links are followed, not everybody knows that (I use stat rarely enough to forget it and only remember when I get unexpected results).

Changed 21 months ago by DmitryBespalov

Thank you, indeed I was used getFileStatus. But Daniel right, it would be nice to mention this feature in description of getFileStatus.

Note: See TracTickets for help on using tickets.