absolute_path for XFile and Entry.

This commit is contained in:
gibbed
2014-01-19 01:28:09 -08:00
parent b62134855a
commit 7da2ad30b0
9 changed files with 44 additions and 22 deletions

View File

@@ -8,7 +8,7 @@
*/
#include <xenia/kernel/fs/entry.h>
#include <xenia/kernel/fs/device.h>
using namespace xe;
using namespace xe::kernel;
@@ -26,12 +26,16 @@ MemoryMapping::~MemoryMapping() {
Entry::Entry(Type type, Device* device, const char* path) :
type_(type),
device_(device) {
XEASSERTNOTNULL(device);
path_ = xestrdupa(path);
// TODO(benvanik): *shudder*
absolute_path_ = xestrdupa((std::string(device->path()) + std::string(path)).c_str());
// TODO(benvanik): last index of \, unless \ at end, then before that
name_ = NULL;
}
Entry::~Entry() {
xe_free(path_);
xe_free(name_);
xe_free(path_);
xe_free(absolute_path_);
}