-
Notifications
You must be signed in to change notification settings - Fork 124
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
Gitbase doesn't work on Windows if it has to traverse a directory for which the access is not authorized #718
Comments
Can't install a windows virtual image, it doesn't fit in my computer (40GB and I just have 18 left). Windows dev machine can't be used today because apps is using it for a demo. So if someone with space and/or a windows machine can take this it would be nice. |
Just FYI I personally had some problems in running Windows locally both using VBox and VMWare, see here. In case you're gonna try and are successful it would be useful if you could share the steps to make it work. |
Well actually without docker should be fine. 😄 |
@erizocosmico I think the main problem here is we stop walking the folder if we have no access permissions in one of the folders inside. Maybe we can reproduce this problem on linux too. |
@se7entyse7en do you know if this happens in linux as well? |
@erizocosmico I don't know, but it never happened to me and I think it never happened to anyone of @src-d/applications (we are 2 OSX and 2 linux). |
Never happened to me but most probably if you create a folder inside repositories path with limited access only to root, for example, you should be able to reproduce it. |
This was discovered while fixing this bug on Engine.
Problem
Version affected: v0.19.0-rc1
On Windows, when the guest path contains some directories for which the access is denied, then gitbase doesn't add any repository, but it doesn't exit. Then engine always just returns an empty result for queries.
Expected behaviour
The expected behavior is that it exits with an error or just ignores those directories. I think that ignoring those directories should require only to return
filepath.SkipDir
when the error passed to the walk function is an access denied.Some details
To debug this issue In the Windows development machine I've created the
gitbase-testing
image that comes with the gitbase source code, git anddlv
for debugging. I ran it as follows:and then I ran:
I've added a break using
break /usr/local/go/src/path/filepath/path.go:375
, rancontinue
5 times and thenstep
until line362
. Here's what happens:About that
C:\Users\Default\AppData\Local\Application Data
directoryThe weird thing is that if you go to
C:\Users\Default\AppData\Local
using the Windows File Explorer, there's noApplication Data
directory even if you ask to show hidden files. Using the shell you can actuallycd
into it, but once inside that you're not able to dols
. Even runningpowershell
with admin privileges doesn't help.The text was updated successfully, but these errors were encountered: