Can't copy in Finder

1,583 views
Skip to first unread message

Tron Thomas

unread,
Feb 25, 2021, 3:49:20 PM2/25/21
to macFUSE

I am experimenting with macFUSE, and writing a simple memory based file system to get familiar with the technology. I’m using Xcode 12.3 with macOS Big Sur 11.2.1 on a M1 based MacBook Pro.

 The file system is read/write and supports creating directories and text files. So far most things seem to be working well. I can create files and directories. I can rename things, and I can delete. I can also copy from the command line.

Where things fail is trying to copy something within the Finder. Whenever I try to copy a text file in the Finder, an empty destination file gets created, and the following error is displayed:

The operation can’t be completed because an unexpected error occurred (error code 100093).

I have been unable to figure out the cause for this error and how to resolve things so the copy operation can succeed.

What could be done that will allow copy operations from the Finder to work properly?

Sam Moffatt

unread,
Feb 26, 2021, 1:02:41 AM2/26/21
to osxfus...@googlegroups.com
Hi Tron,

My usual stock advice is to run your file system in single threaded mode (-s) and with debug on (-d) then look at each of the operations that you're getting. Likely what is happening is that Finder is making a call into your filesystem and you're returning something you think is reasonable but is something Finder isn't expecting. Double check the return codes of everything per the man pages as well because it's possible that's where some of the confusion lies. If you can't reproduce it whilst running in single threaded mode then you're dealing with some sort of race condition inside your file system.

Cheers,

--
You received this message because you are subscribed to the Google Groups "macFUSE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osxfuse-grou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osxfuse-group/39aff3cd-5e0d-4608-83f4-d16a178f80c1n%40googlegroups.com.

Tron Thomas

unread,
Feb 26, 2021, 5:53:04 PM2/26/21
to macFUSE

Okay, I believe I have figured things out.

Originally the File object had been implemented as a text file, so it was storing its data as a text string. This worked fine in general. However, when copying through the Finder macFUSE was creating an extra file prefixed with ._  to store things like extended attributes or something, even though none of the source files for the copy ever had extended attributes. Anyway, the data that were written to that extra hidden file were binary data, and so trying to store those data as text failed. Once the File object was converted to storing its content as generic data instead of just assuming text, everything started working, including copying through the Finder.

Sam Moffatt

unread,
Feb 28, 2021, 10:02:53 PM2/28/21
to osxfus...@googlegroups.com
Hi Tron,

You're talking about the Apple DoubleFile that MacOS adds to file systems that don't support extended attributes or resource forks. You'd have to look at the original file to see if it had anything but either way it's good to hear you got it figured out.

If you implement the extended attribute calls, MacOS should set those values instead of using an AppleDouble file.

Cheers,
Reply all
Reply to author
Forward
0 new messages