Closed dcbullock closed 2 years ago
This issue is a result of Kumu::PathDirname
followed by Kumu::PathJoin
.
Options.file_root == "blue.xml" - no path separator character
std::string out_path = Kumu::PathDirname(Options.file_root);
out_path == ""
result = Writer.OpenWrite(Kumu::PathJoin(out_path, Kumu::UUID(ri->ResourceID).EncodeHex(buf, 64)).c_str());
Since out_path is "", PathJoin returns a string that begins with the path separator. This results in a filename with a single path element, "/" - the root directory.
Kumu::PathDirname
should return "."+separator ("./") when there is no separator in the argumentKumu::PathJoin
should not prepend its return with the separator when the first argument is ""Those change are both fairly invasive API changes that might break UNIX, Mac, or Windows file handling in other areas.
So, just check for out_path == "" in asdcp-test and asdcp-unwrap and replace with "./" before the call to Kumu::PathJoin
.
Fixed by JH in 38484de .
If <file-prefix> does not include a path portion, asdcp-unwrap will try to write timed-text ancillary resources with a path prefix of "/". On any system that protects that directory, an error will occur. On others, the ancillary resources are written in an unexpected directory.
without path portion
with path portion