Skip to content

Conversation

@guidocella
Copy link
Contributor

@guidocella guidocella commented Oct 7, 2025

misc/path_utils: don't normalize -

This fixes options like --audio-file=- and avoids returning $PWD/- as
path and stream-open-filename when playing from standard input.

It will also allow storing playlist filenames as normalized without
checking for - at the caller.

Fixes 23b57e9.

@kasper93 kasper93 requested a review from Dudemanguy October 7, 2025 19:04
@sfan5
Copy link
Member

sfan5 commented Oct 7, 2025

I think the caller should catch this. "-" is not a generally invalid path.

@guidocella
Copy link
Contributor Author

- is always going to be stdin in the context of mpv, e.g. it can also be used in external track filenames, or caused breakage in #15165 (comment). There's no reason to make every caller check it.

@github-actions
Copy link

github-actions bot commented Oct 7, 2025

@kasper93 kasper93 added this to the Release v0.41.0 milestone Oct 7, 2025
@sfan5
Copy link
Member

sfan5 commented Oct 7, 2025

We have a bunch of fopen calls so that isn't entirely true. I guess it's okay anyway however since not normalizing a patch won't hurt.

@guidocella
Copy link
Contributor Author

This actually fixes options like --audio-file=-. They are broken on master.

This fixes options like --audio-file=- and avoids returning $PWD/- as
path and stream-open-filename when playing from standard input.

It will also allow storing playlist filenames as normalized without
checking for - at the caller.

Fixes 23b57e9.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants