1
0
Fork 0
forked from suyu/suyu

vfs: Replace cstr concat with char concat

This commit is contained in:
Merry 2023-01-01 18:52:02 +00:00
parent 92103d4ff3
commit bee395d2f0

View file

@ -194,9 +194,9 @@ std::size_t VfsFile::WriteBytes(const std::vector<u8>& data, std::size_t offset)
std::string VfsFile::GetFullPath() const { std::string VfsFile::GetFullPath() const {
if (GetContainingDirectory() == nullptr) if (GetContainingDirectory() == nullptr)
return "/" + GetName(); return '/' + GetName();
return GetContainingDirectory()->GetFullPath() + "/" + GetName(); return GetContainingDirectory()->GetFullPath() + '/' + GetName();
} }
VirtualFile VfsDirectory::GetFileRelative(std::string_view path) const { VirtualFile VfsDirectory::GetFileRelative(std::string_view path) const {
@ -435,7 +435,7 @@ std::string VfsDirectory::GetFullPath() const {
if (IsRoot()) if (IsRoot())
return GetName(); return GetName();
return GetParentDirectory()->GetFullPath() + "/" + GetName(); return GetParentDirectory()->GetFullPath() + '/' + GetName();
} }
bool ReadOnlyVfsDirectory::IsWritable() const { bool ReadOnlyVfsDirectory::IsWritable() const {