Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Brief summary
This fixes an escaping issue causing UNC paths not to be read correctly in ffmpeg concat files generated by ABS
Which issue is fixed?
Fixes the re-opened audiobookshelf-windows issue #29.
In-depth Description
The issue was that the \\ chatacters in the beginning of the UNC path were not escaped in the ffmpeg concat file, and therefore the path was mangled.
Rather than escaping those, I fixed this by surrounding file paths in the concat file with single quotes (and consequently also modifying
escapeSingleQuotes
)This way is safer, since now the only character that needs escaping inside a file name is a single quote, which the aptly named
escapeSingleQuotes
function now really does - no other characters (like spaces or backslashes) need to be escaped.How have you tested this?
I tested with a combination of UNC paths that also contain single quotes.
I tested both codepaths that call
writeConcatFile
(encode m4b, and stream).