[studio] Fix PassThroughFS::mkdir to report correctly if a trailing / is given
Build / build (push) Successful in 1m9s
Build / build (push) Successful in 1m9s
This commit is contained in:
+3
-1
@@ -28,8 +28,10 @@ String PassThroughFS::basePath() const noexcept {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Error PassThroughFS::mkdir(StringViewCR path, bool recursive) noexcept {
|
Error PassThroughFS::mkdir(StringViewCR path, bool recursive) noexcept {
|
||||||
|
auto const cleanPath =
|
||||||
|
endsWith(path, '/') ? substr(path, 0, path.size() - 1) : path;
|
||||||
bool success = false;
|
bool success = false;
|
||||||
const auto p = m_path / stripSlash(path);
|
auto p = cleanPath.size() ? m_path / stripSlash(cleanPath) : m_path;
|
||||||
const auto u8p = p.u8string();
|
const auto u8p = p.u8string();
|
||||||
oxTrace("ox.fs.PassThroughFS.mkdir", std::bit_cast<const char*>(u8p.c_str()));
|
oxTrace("ox.fs.PassThroughFS.mkdir", std::bit_cast<const char*>(u8p.c_str()));
|
||||||
if (recursive) {
|
if (recursive) {
|
||||||
|
|||||||
Reference in New Issue
Block a user