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

path-unix: Only accept absolute paths #12258

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

Conversation

linkmauve
Copy link
Contributor

The XDG Base Directory specification says “All paths set in these environment variables must be absolute. If an implementation encounters a relative path in any of these variables it should consider the path invalid and ignore it.”

The XDG Base Directory specification says “All paths set in these
environment variables must be absolute. If an implementation encounters
a relative path in any of these variables it should consider the path
invalid and ignore it.”
Copy link
Member

@philipl philipl left a comment

Choose a reason for hiding this comment

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

Should we log something so there's feedback?

@N-R-K
Copy link
Contributor

N-R-K commented Aug 26, 2023

Should we log something so there's feedback?

You can't (not without doing hacky shit) since pthread_once doesn't accept a context pointer. There was a discussion about the same issue here: #12135 (comment)

err = err || MKPATH(mpv_home, "%s/.config/mpv", home);
}

// Maintain compatibility with old ~/.mpv
if (home && home[0])
if (home && home[0] == '/')
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't look right. $HOME is not part of XDG base dirs.

Same with all the other home[0] == '/' cases.

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

Successfully merging this pull request may close these issues.

4 participants