[ox/fs] Cleanup, Fix FileLocation to make copy of non-const strings

This commit is contained in:
2019-11-26 23:18:38 -06:00
parent 147a37ac6e
commit 1d600186cd
4 changed files with 3 additions and 445 deletions

View File

@@ -28,7 +28,9 @@ FileAddress::FileAddress(uint64_t inode) {
}
FileAddress::FileAddress(char *path) {
m_data.path = path;
auto pathSize = ox_strlen(path) + 1;
m_data.path = new char[pathSize];
memcpy(m_data.path, path, pathSize);
m_type = FileAddressType::Path;
}