absolute_path for XFile and Entry.
This commit is contained in:
@@ -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_);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user