Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot save from TextEdit or Preview on OSX #93

Open
daniel-centore opened this issue Feb 6, 2020 · 7 comments
Open

Cannot save from TextEdit or Preview on OSX #93

daniel-centore opened this issue Feb 6, 2020 · 7 comments

Comments

@daniel-centore
Copy link

Whenever I try to edit files on the MemoryFS using TextEdit or Preview, I get this error when I try to save:

image
"The document “Sample file.txt” could not be saved."

And this one when I try to close the file:
image

"The document “Sample file.txt” is on a volume that does not support permanent version storage."

The console log suggests that it's trying to access files with weird suffixes like ".sb-c840fa8f-BaE37t".

Any idea how to resolve this so the MemoryFS can behave like a normal APFS volume?

@SerCeMan
Copy link
Owner

SerCeMan commented Feb 6, 2020

Hey, @daniel-centore! MemoryFS is a simple toy example of how you could build a full-fledged file system backed by fuse. For open-source examples of file systems built on fuse, you can refer to projects-using-jnr-fuse or any other projects that use fuse since they're pretty much interchangeable.

@onrcandan
Copy link

any update in here @daniel-centore

@daniel-centore
Copy link
Author

@onrcandan no, I never figured this out. If anyone does figure it out, I would probably revive an old side project of mine...

@stanimirivanovde
Copy link
Contributor

This is due to the extended attribute support for Mac OS X. You either have to implement the full xattr FUSE functions or disable the xattr support with: -oauto_xattr

@daniel-centore
Copy link
Author

You either have to implement the full xattr FUSE functions or disable the xattr support with: -oauto_xattr

I had tried to do this but for some reason still couldn't get it to work. Having a simple, working example of how to do this in MemoryFS would definitely be helpful

@stanimirivanovde
Copy link
Contributor

@daniel-centore this is outside the simple example and the project's idea. It really goes down to what are the actual OS kernel requirements to properly implement a user-space file system. Another option you can give a try is -oauto-cache. This option was important to fix multiple bugs in our software.

The following options together worked fine for our propitiatory FS:

-ovolname=SimpleFS
-odaemon_timeout=30
-oauto_xattr
-odefault_permissions
-oallow_other
-oauto_cache

But this means your implementation of the APIs need to be correct as well.

@fs185085781
Copy link

这个很简单就可以解决,只需要改一下statfs方法,让macos系统认为磁盘有空间即可正常保存

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants