Skip Menu |

This queue is for tickets about the File-HomeDir CPAN distribution.

Report information
The Basics
Id: 110049
Status: open
Priority: 0/
Queue: File-HomeDir

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 1.00
Fixed in: (no value)



Subject: my_blah fails on OS X if the target is an alias.
[OS X 10.10.5, Perl 5.20.2]

On my Macbook Pro ~/Movies is an alias (not a symlink) to a directory on another disk.  File::HomeDir does not expect aliases, only directories or symlinks.

https://metacpan.org/pod/MacOSX::Alias can read aliases, though it relies on the rather large Mac::Carbon.  I wonder if there's a quick and dirty way to extract the path?
On Thu Dec 03 19:08:04 2015, MSCHWERN wrote: Show quoted text
> [OS X 10.10.5, Perl 5.20.2] > > On my Macbook Pro ~/Movies is an alias (not a symlink) to a directory on > another disk. File::HomeDir does not expect aliases, only directories or > symlinks. > > https://metacpan.org/pod/MacOSX::Alias can read aliases, though it relies on > the rather large Mac::Carbon. I wonder if there's a quick and dirty way to > extract the path?
Quick and dirty would be possible as described in https://en.wikipedia.org/wiki/Alias_(Mac_OS) when Leon would merge and release https://github.com/Leont/file-slurp-sane/pull/7 (or similar). Maybe using IO::File and sysread can lead to success, too :) My preferred way would be like in https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/AccessingFilesandDirectories/AccessingFilesandDirectories.html#//apple_ref/doc/uid/TP40010672-CH3-SW10 But re-activating Carbon support sounds being the worst idea of all /o\ Cheers, Jens