-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Fix incorrect check on importing project #77832
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tho it's more improve
than fix
, if the folder name ends with .zip
it still breaks in the same way, and also selecting a project to import by typing into the text field instead of using the browse dialog seems pretty broken in general
That's true, should add a check for folders perhaps It is indeed pretty broken, it does not update correctly to do install instead of import, think the fix here is sufficient on its own, though there are absolutely reasonable and valid cases where folders end in Will look at doing some wider fixes to the updating of the path, if I end up having the time and energy to do so soon I'll add it to this as well |
Got some ideas digging into some of the code, will test them later today probably, marking as draft until then |
ddc039b
to
7bfc399
Compare
Some improvements, it's still pretty inefficient and spaghetti, and if you point to a This needs a major cleaning but at least now it should work correctly, will clean up some of the code though |
d31d38e
to
a137694
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this!
a137694
to
d8ec1a3
Compare
d8ec1a3
to
e2732f1
Compare
bool is_zip = false; | ||
if (d->change_dir(base_path) == OK) { | ||
valid_path = base_path; | ||
} else if (is_zip_file(d, base_path)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reordering here in the weird case where there's a file matching but not a directory, unsure if this will ever happen, but it can't hurt, though I'm not even sure trailing and leading spaces are valid for paths in any OS
e2732f1
to
3936987
Compare
3936987
to
13270fe
Compare
13270fe
to
0a2ddaa
Compare
Thanks! |
Thank you! |
Note: #77760 makes this impossible to test on some platforms, see there, reverting the cause helps verify this fix
(This problem also occurs on 3.x, have not tested if this can be cherry-picked)