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

Utility: handle Path::{configuration,home}Directory() failures on Windows #141

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mosra
Copy link
Owner

@mosra mosra commented Jun 1, 2022

Attempts to fix #132, waiting on confirmation from @Squareys. Things to do:

  • Verify this handles the failure properly
  • Update the expected message prefix in the test, the code is probably something else than 666

…dows.

These can happen on system accounts without a home folder, for example.
Seems like I didn't read the documentation properly when I made this
into an assert in e1e813e.

Original code had a *silly* check for the appdata path being empty, and
since e1e813e failing in that case, but
the check dates back to e1e813e from
2011, and unfortunately I don't remember what was the logic behind it
back then. Windows XP compatibility or some such? Instead, it's now
morphed into checking the result of SHGetFolderPathW(). Hopefully that
won't cause some other regression again.
@codecov
Copy link

codecov bot commented Jun 1, 2022

Codecov Report

Merging #141 (94f841e) into master (c5102b3) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #141   +/-   ##
=======================================
  Coverage   98.40%   98.40%           
=======================================
  Files         124      124           
  Lines        9504     9504           
=======================================
  Hits         9352     9352           
  Misses        152      152           
Impacted Files Coverage Δ
src/Corrade/Utility/Path.cpp 88.40% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c5102b3...94f841e. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: TODO
Development

Successfully merging this pull request may close these issues.

Path::homeDirectory(): asserts when run by Windows users without home directory
1 participant