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

gui: /rest/system/browse with no arguments returns drives on Windows … #3203

Closed

Conversation

AudriusButkevicius
Copy link
Member

See title

kernel32, err := syscall.LoadDLL("kernel32.dll")
if err != nil {
return drives
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just return nil?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't really matter does it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It matters only in that when looking at this I need to keep track of if we've actually done anything with drives to see what we return in the error cases. That's trivial in the first case but when looking at line 34 I actually have to parse lines 18-33 as well to understand what it means.

As an aside, shouldn't we just return ([]string, error) and let the API return a 500 when this fails on Windows? The empty success response isn't meaningful by itself, is it?

@AudriusButkevicius
Copy link
Member Author

Bump.

@calmh
Copy link
Member

calmh commented May 31, 2016

@st-review merge it!

@st-review
Copy link

👌 Merged as 1612bac. Thanks, @AudriusButkevicius!

@st-review st-review closed this May 31, 2016
st-review pushed a commit that referenced this pull request May 31, 2016
@AudriusButkevicius AudriusButkevicius deleted the dletters branch May 31, 2016 19:27
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Jun 16, 2017
@syncthing syncthing locked and limited conversation to collaborators Jun 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants