[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible bug in NSFileManager
From: |
Richard Frith-Macdonald |
Subject: |
Re: Possible bug in NSFileManager |
Date: |
Sat, 9 Mar 2002 06:10:02 +0000 |
On Saturday, March 9, 2002, at 12:20 AM, e.sammer wrote:
i've been using NSFileManager to do quite a bit of work. it seems that
NSFileManager doesn't handle symlinks properly. i know that
linkPath:toPath:handler: is not implemented (as seen in
NSFileManager.m), but in copyFile: it does not respect symlinks at all.
according to the MOSX docs (and in my MOSX tests) copyPath:toPath:
should maintain a symlink. i've looked in the docs that talk about the
differences between GS and MOSX / OpenStep and there's no mention of
this.
I assume you mean in [copyPath:toPath:handler:] (there is no copyFile:
method) ... it should work there.
As far as I can see from quick look over the code, it should honor the
documentation to the letter -
but the documentation is not completely unambiguous :-(
Could you provide a small test program to demonstrate your problem.
While the code seems to conform to the letter of the documentation, I'm
not at all sure it does the
most intuitive/useful thing. It seems to be preserving the original
symbolic links - but I'd have
thought it made more sense, if a link pointed to somewhere within the
path being copied, for the
new symbolic link to be made to the appropriate location within the
copied structure.
> is there a fundamental problem with symlinks that i'm not aware of?
> i know GS is meant to be portable and some systems do notsupport them,
> but there seems to be half of the implementation in place which leads
me
> to believe it could just be an oversight.
I guess few people use them, and thus no comparison between actual
MacOS-X behavior and GNUstep
behavior has been made. I'd be very happy to apply patches to fix this
to provide the same
real (as opposed to documented) behavior - as long as the real MacOS-X
behavior is not clearly
a bug of course.