Permission Denied panic errors on Windows when adding folders
On Windows 11 with the latest release it's not possible to add folders.
PS > .\oxen add .\data\
thread '<unnamed>' panicked at src/lib/src\core\v0_19_0\add.rs:461:38:
called `Result::unwrap()` on an `Err` value: Basic(StringError("File copy error: Os { code: 5, kind: PermissionDenied, message: \"Access is denied.\" }\nCould not copy from `\"E:\\\\oxen\\\\data\\\\folder1\\\\file.tif\"` to `\"E:\\\\oxen\\\\.oxen\\\\versions\\\\files\\\\63\\\\d7121bdf87d99c7042a74c0d01a9f0\\\\data\"`"))
Things I tried:
- Running in an administrator level shell
- Playing with forward/back slashes
- Playing with/without trailing slashes
I am able to add individual files.
Hey Sean, I just pushed a release that fixes some unit tests on windows tonight. Looks like it could be related. Did you try v0.20.0 or v0.19.x?
Admin shell is an interesting case though, let me check with some different permissioning.
I tried a few different releases but always get the same error when adding folders.
I'm also having problems adding files in subfolders one at a time:
PS E:\oxen\data\dir1\dir2> ..\..\..\oxen status
Untracked Files
(use "oxen add <file>..." to update what will be committed)
data\dir1\dir2\file1.tif
... and 170 others
PS E:\oxen\data\dir1\dir2> ..\..\..\oxen.exe add file1.tif
🐂 oxen added 0 files (0 B) in 19ms
Ah yes, are you adding the file while inside a subdirectory of the repository? If so that's a known bug and we can get a fix shortly. Makes sense that would be the first thing to try if the directory add isn't working :)
As for the permission denied on the directory oxen add I will try to find a repro on our end and get back to you!
Quick update here:
- We fixed the bug with adding within a subdirectories
- Still working on reproducing the permission denied error - spinning up some Windows servers to do more testing. Let me know if you have any clues that come to mind.
@seanhoughton we've made a lot of updates in the relevant code for add. We haven't been able to reproduce the issue on newer versions of Oxen, but if you have a moment to test I'd be really interested to see how it works for you.