Re: Weird issue with BDAlias/FSRefs and the case of filesystem paths

2010-01-05 Thread Rob Keniger

On 06/01/2010, at 6:18 AM, Kyle Sluder wrote:

 If the directory is on a case-insensitive HFS volume (the default),

Yes, it is.

 It will also be helpful to see what the value of $HOME is, and if it
 jives with the on-disk name.


echo $HOME
/Users/rob

This is really, really weird. I've since rebuilt the directory with Diskwarrior 
with no change to the behaviour. On the other machines here everything's 
working so it must be something unique to my setup but I have absolutely no 
idea where to start looking.

--
Rob Keniger



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Weird issue with BDAlias/FSRefs and the case of filesystem paths

2010-01-05 Thread Rob Keniger

On 06/01/2010, at 10:29 AM, Rob Keniger wrote:

 This is really, really weird. I've since rebuilt the directory with 
 Diskwarrior with no change to the behaviour. On the other machines here 
 everything's working so it must be something unique to my setup but I have 
 absolutely no idea where to start looking.


OK, so I took the brute force approach. I booted into single-user mode and did 
this:

mv Users Lusers
mv Lusers Users

Now everything's fine. Nothing to see here, sorry for the waste of bandwidth.

--
Rob Keniger



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Weird issue with BDAlias/FSRefs and the case of filesystem paths

2010-01-04 Thread Rob Keniger
Hi everyone,

I'm using the BDAlias wrapper (http://github.com/rentzsch/bdalias) for handling 
alias records so that my app manages files better when they're moved or renamed.

Things were working fine but recently, for no apparent reason, any alias that 
points to a file in the Users folder returns a lowercase users filename for 
the Users folder rather than the normal Users.

This means that my paths look like this:

/users/rob/some/file.html

rather than this:

/Users/rob/some/file.html

If I use any of the Cocoa methods to select a file such as NSOpenPanel, or just 
print NSHomeDirectory(), I get the correct result, Users.

In the Finder and when using Terminal, the folder is named Users. From what I 
can tell there are no extended attributes on the Users folder, running xattr 
-l -v /Users returns nothing.

I've looked at the BDAlias code and it's pretty straightforward, it is just 
getting a CFURLRef from the path and then grabbing the FSRef from the URL, 
something like this:

FSRef *outRef;
CFURLReftempURL = NULL;
Boolean gotRef = false;
tempURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, inPath, 
kCFURLPOSIXPathStyle, false);
if (tempURL == NULL)
return fnfErr;
gotRef = CFURLGetFSRef(tempURL, outRef);

When the BDAlias object is asked for its path it does the reverse, and gets the 
path from the FSRef via a CFURL:

CFURLCreateFromFSRef(kCFAllocatorDefault, inRef);
if (tempURL == NULL)
   return NULL;
CFStringRef result = CFURLCopyFileSystemPath(tempURL, kCFURLPOSIXPathStyle);

This all seems fine, and the only things I can think of is that there is some 
weird bug in CoreFoundation that's causing this or that my drive is corrupted 
in some weird fashion, although Disk Utility reports no problems.

Interestingly, on my system other apps such as BBEdit and Coda also exhibit 
this behaviour. In BBEdit for example, if I choose Edit  Insert  File/Folder 
Paths then I get /users/rob/some/file.html. I assume that's because it's also 
using FSRefs internally.

I don't understand what could be happening here, does anyone have any clues? 
I've never seen anything like this.

--
Rob Keniger



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com