* returns the file path stripped of any /tune_xxx.* subtune suffix * and the track number (or 0 if no "tune_xxx" suffix is present). */
| 81 | * and the track number (or 0 if no "tune_xxx" suffix is present). |
| 82 | */ |
| 83 | static GmeContainerPath |
| 84 | ParseContainerPath(Path path_fs) |
| 85 | { |
| 86 | const Path base = path_fs.GetBase(); |
| 87 | unsigned track; |
| 88 | if (base.IsNull() || |
| 89 | (track = ParseSubtuneName(NarrowPath(base))) < 1) |
| 90 | return { AllocatedPath(path_fs), 0 }; |
| 91 | |
| 92 | return { path_fs.GetDirectoryName(), track - 1 }; |
| 93 | } |
| 94 | |
| 95 | static AllocatedPath |
| 96 | ReplaceSuffix(Path src, |
no test coverage detected