Oxen-AI / Oxen

Oxen.ai's core rust library, server, and CLI
https://oxen.ai
Apache License 2.0
202 stars 12 forks source link

Permission Denied panic errors on Windows when adding folders #467

Open seanhoughton opened 1 week ago

seanhoughton commented 1 week ago

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:

I am able to add individual files.

gschoeni commented 1 week ago

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?

gschoeni commented 1 week ago

Admin shell is an interesting case though, let me check with some different permissioning.

seanhoughton commented 1 week ago

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
gschoeni commented 1 week ago

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!