I have this fuse filesystem written towards the ObjC API. I'm running
into this error where whenever I copy a file to the fuse volume using
Finder, Finder fails with a permissions error. However, I can write to
it using the command line without a problem.
Taking a look at LoopbackFS, I'm pretty certain the right errors have
been returned. After turning on debug mode, I found that it's failing
while creating the resource fork. Here's the relevant log output:
unique: 4, opcode: LOOKUP (1), nodeid: 1, insize: 54
LOOKUP /Project.tmproj
2008-04-15 00:00:05.926 MyLog: attributesOfItemAtPath: /Project.tmproj
2008-04-15 00:00:05.928 MyLog: Cannot find /Project.tmproj: NSError
"POSIX error: No such file or directory" Domain=NSPOSIXErrorDomain
Code=2
unique: 2, error: -2 (No such file or directory), outsize: 16
unique: 4, opcode: LOOKUP (1), nodeid: 1, insize: 54
unique: 0, opcode: CREATE (35), nodeid: 1, insize: 62
2008-04-15 00:00:05.930 MyLog: createFileAtPath: /Project.tmproj
2008-04-15 00:00:05.935 MyLog: FUSE created file at: /Project.tmproj
2008-04-15 00:00:05.939 MyLog: Successfully opened /Project.tmproj for
writing
2008-04-15 00:00:05.939 MyLog: attributesOfItemAtPath: /Project.tmproj
NODEID: 84
unique: 0, error: 0 (Unknown error: 0), outsize: 152
CREATE[502480288] flags: 0x202 /Project.tmproj
-----------------> So far, this is correct, didn't find the file,
created it.
-----------------> Below looks very strange
unique: 3, opcode: LOOKUP (1), nodeid: 1, insize: 56
LOOKUP /._Project.tmproj
2008-04-15 00:00:05.941 MyLog:
attributesOfItemAtPath: /._Project.tmproj
2008-04-15 00:00:05.945 MyLog: Cannot find /._Project.tmproj: NSError
"POSIX error: No such file or directory" Domain=NSPOSIXErrorDomain
Code=2
2008-04-15 00:00:05.945 MyLog: attributesOfItemAtPath: /Project.tmproj
2008-04-15 00:00:05.947 MyLog: attributesOfItemAtPath: /Project.tmproj
NODEID: 85
unique: 3, error: 0 (Unknown error: 0), outsize: 136
This is strange because the file: ._Project.tmproj does not exist, my
FUSE code detected and returned ENOENT when attributesOfItemAtPath is
called. However, instead of returning that failure, macfuse seemed to
have called attributesOfItemAtPath: /Project.tmproj instead and
accepted response for that.
Here's my attributesOfItemAtPath function:
- (NSDictionary *) attributesOfItemAtPath: (NSString *) path
error: (NSError **) error
{
...... logic to translate fuse path to path on disk.
if( realPath == nil )
{
*error = [NSError errorWithPOSIXCode: ENOENT];
NSLog( @"Cannot find %@: %@", path, *error );
return nil;
}
return [[NSFileManager defaultManager] fileAttributesAtPath:
realPath
traverseLink: NO];
}
any pointers will be greatly appreciated.
-David
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"macfuse-devel" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/macfuse-devel?hl=en
-~----------~----~----~----~------~----~------~--~---