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

fix: BaseURL missing when MPD base path is empty #1380

Merged

Conversation

cosmin
Copy link
Contributor

@cosmin cosmin commented Mar 22, 2024

The check for !mpd_dir.empty() is not needed because MakePathRelative handles the case where the parent path is empty. As a result of this check the base url, segment url, or segment template URLs were all missing in cases where the mpd output was in the current working directory.

Fixes #1378

@sr1990
Copy link
Contributor

sr1990 commented Mar 23, 2024

Looks like this is related to change from FilePath to std::filesystem::path which expects "." to represent current directory. Do you think it makes sense to use fs::exists to see if the current directory is a real, accessible location in the filesystem and/or update the mpd_dir to current directory "." if mpd_dir.empty() is true?

@cosmin cosmin merged commit 90c3c3f into shaka-project:main Mar 27, 2024
36 checks passed
@cosmin cosmin deleted the fix-base-url-when-mpd-path-is-empty branch March 27, 2024 19:03
joeyparrish pushed a commit that referenced this pull request Mar 27, 2024
🤖 I have created a release *beep* *boop*
---


## [3.0.4](v3.0.3...v3.0.4) (2024-03-27)


### Bug Fixes

* BaseURL missing when MPD base path is empty ([#1380](#1380)) ([90c3c3f](90c3c3f)), closes [#1378](#1378)
* Fix NPM binary selection on ARM Macs ([#1376](#1376)) ([733af91](733af91)), closes [#1375](#1375)

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label May 26, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated
Projects
None yet
3 participants