gnu-misc-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: symlink weirdness


From: Roger Dahl
Subject: Re: symlink weirdness
Date: 15 Sep 2004 14:13:12 -0700

Stefan Monnier <monnier@iro.umontreal.ca> wrote in message 
news:<jwvr7p4pnka.fsf-monnier+gnu.misc.discuss@gnu.org>...
> >> ln -s `relpath $C $B` $C
> > Though I can't off the top of my head think of any other tools that
> > might benefit from it, I like that idea.
> 
> It's sufficiently useful for Emacs to have a function that does just that:
> file-relative-name.  It doesn't pay attention to symlinks, tho (more to the
> point, the function is a pure string-manipulation and works without even
> looking at the file system AFAIK) so the result might not work.
> 
> 
>         Stefan

Hi Stefan,

There's one in Perl too. It's in File::PathConvert, called abs2rel.

When would the result created without looking at the file system not
work? I don't know if it's true for all OSes, but GNU/Linux can have
symlinks use other symlinks, so is any special attention to symlinks
needed?

Roger

reply via email to

[Prev in Thread] Current Thread [Next in Thread]