File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -637,18 +637,20 @@ std::vector<std::string> PackFile::verifyEntryChecksumsUsingCRC32() const {
637637
638638std::string PackFile::getBakeOutputDir (const std::string& outputDir) const {
639639 std::string out = outputDir;
640- if (!out.empty ()) {
641- string::normalizeSlashes (out, false );
642- } else {
640+ if (out.empty ()) {
643641 out = this ->fullFilePath ;
644642 auto lastSlash = out.rfind (' /' );
645- string::normalizeSlashes (out, false );
643+ auto lastBackSlash = out.rfind (' \\ ' );
644+ if (lastSlash == std::string::npos || (lastBackSlash != std::string::npos && lastBackSlash > lastSlash)) {
645+ lastSlash = lastBackSlash;
646+ }
646647 if (lastSlash != std::string::npos) {
647648 out = this ->getFilepath ().substr (0 , lastSlash);
648649 } else {
649650 out = " ." ;
650651 }
651652 }
653+ string::normalizeSlashes (out, false );
652654 return out;
653655}
654656
You can’t perform that action at this time.
0 commit comments