summaryrefslogtreecommitdiff
path: root/src/common/fs/path_util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/fs/path_util.cpp')
-rw-r--r--src/common/fs/path_util.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp
index d2f50432a..4f69db6f5 100644
--- a/src/common/fs/path_util.cpp
+++ b/src/common/fs/path_util.cpp
@@ -418,9 +418,9 @@ std::string SanitizePath(std::string_view path_, DirectorySeparator directory_se
418 return std::string(RemoveTrailingSlash(path)); 418 return std::string(RemoveTrailingSlash(path));
419} 419}
420 420
421std::string_view GetParentPath(std::string_view path) { 421std::string GetParentPath(std::string_view path) {
422 if (path.empty()) { 422 if (path.empty()) {
423 return path; 423 return std::string(path);
424 } 424 }
425 425
426#ifdef ANDROID 426#ifdef ANDROID
@@ -439,7 +439,7 @@ std::string_view GetParentPath(std::string_view path) {
439 name_index = std::max(name_bck_index, name_fwd_index); 439 name_index = std::max(name_bck_index, name_fwd_index);
440 } 440 }
441 441
442 return path.substr(0, name_index); 442 return std::string(path.substr(0, name_index));
443} 443}
444 444
445std::string_view GetPathWithoutTop(std::string_view path) { 445std::string_view GetPathWithoutTop(std::string_view path) {