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

Read-only support #5

Open
kriswebdev opened this issue Nov 9, 2015 · 0 comments
Open

Read-only support #5

kriswebdev opened this issue Nov 9, 2015 · 0 comments

Comments

@kriswebdev
Copy link

Hello,

Please correct this terrible bug in encfs/encfs/compatwin.cpp

HANDLE f = CreateFileW(fn.c_str(), flags == O_RDONLY ? GENERIC_WRITE : GENERIC_WRITE|GENERIC_READ, FILE_SHARE_DELETE|FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);

MUST BE :

HANDLE f = CreateFileW(fn.c_str(), flags == O_RDONLY ? GENERIC_READ : GENERIC_WRITE|GENERIC_READ, FILE_SHARE_DELETE|FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);

Of course, if it's a read-only file, we're not going to open it write-only.

Also, there's a bug in dokany flags conversion, see link below.

EDIT: I've created a fork that fixes this issue: https://github.com/kriswebdev/encfs4win-reloaded

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

1 participant