summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-11-12 01:27:35 +0100
committerbunnei <bunneidev@gmail.com>2014-11-18 03:49:24 +0100
commita3107a6b571dedb8828b20ddcb709ec17db9715a (patch)
tree367848a8e6e445e062f10378d45aa6a4abfcb63b /src/core/hle/kernel
parentFileSys: Added DebugStr method to Path class. (diff)
downloadyuzu-a3107a6b571dedb8828b20ddcb709ec17db9715a.tar
yuzu-a3107a6b571dedb8828b20ddcb709ec17db9715a.tar.gz
yuzu-a3107a6b571dedb8828b20ddcb709ec17db9715a.tar.bz2
yuzu-a3107a6b571dedb8828b20ddcb709ec17db9715a.tar.lz
yuzu-a3107a6b571dedb8828b20ddcb709ec17db9715a.tar.xz
yuzu-a3107a6b571dedb8828b20ddcb709ec17db9715a.tar.zst
yuzu-a3107a6b571dedb8828b20ddcb709ec17db9715a.zip
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/archive.cpp14
-rw-r--r--src/core/hle/kernel/archive.h6
2 files changed, 10 insertions, 10 deletions
diff --git a/src/core/hle/kernel/archive.cpp b/src/core/hle/kernel/archive.cpp
index 764082d71..5d734d042 100644
--- a/src/core/hle/kernel/archive.cpp
+++ b/src/core/hle/kernel/archive.cpp
@@ -129,12 +129,12 @@ public:
class File : public Object {
public:
std::string GetTypeName() const override { return "File"; }
- std::string GetName() const override { return path; }
+ std::string GetName() const override { return path.DebugStr(); }
static Kernel::HandleType GetStaticHandleType() { return HandleType::File; }
Kernel::HandleType GetHandleType() const override { return HandleType::File; }
- std::string path; ///< Path of the file
+ FileSys::Path path; ///< Path of the file
std::unique_ptr<FileSys::File> backend; ///< File backend interface
/**
@@ -221,12 +221,12 @@ public:
class Directory : public Object {
public:
std::string GetTypeName() const override { return "Directory"; }
- std::string GetName() const override { return path; }
+ std::string GetName() const override { return path.DebugStr(); }
static Kernel::HandleType GetStaticHandleType() { return HandleType::Directory; }
Kernel::HandleType GetHandleType() const override { return HandleType::Directory; }
- std::string path; ///< Path of the directory
+ FileSys::Path path; ///< Path of the directory
std::unique_ptr<FileSys::Directory> backend; ///< File backend interface
/**
@@ -366,7 +366,7 @@ Handle CreateArchive(FileSys::Archive* backend, const std::string& name) {
* @param mode Mode under which to open the File
* @return Opened File object
*/
-Handle OpenFileFromArchive(Handle archive_handle, const std::string& path, const FileSys::Mode mode) {
+Handle OpenFileFromArchive(Handle archive_handle, const FileSys::Path& path, const FileSys::Mode mode) {
File* file = new File;
Handle handle = Kernel::g_object_pool.Create(file);
@@ -386,7 +386,7 @@ Handle OpenFileFromArchive(Handle archive_handle, const std::string& path, const
* @param path Path to the Directory inside of the Archive
* @return Opened Directory object
*/
-Result CreateDirectoryFromArchive(Handle archive_handle, const std::string& path) {
+Result CreateDirectoryFromArchive(Handle archive_handle, const FileSys::Path& path) {
Archive* archive = Kernel::g_object_pool.GetFast<Archive>(archive_handle);
if (archive == nullptr)
return -1;
@@ -401,7 +401,7 @@ Result CreateDirectoryFromArchive(Handle archive_handle, const std::string& path
* @param path Path to the Directory inside of the Archive
* @return Opened Directory object
*/
-Handle OpenDirectoryFromArchive(Handle archive_handle, const std::string& path) {
+Handle OpenDirectoryFromArchive(Handle archive_handle, const FileSys::Path& path) {
Directory* directory = new Directory;
Handle handle = Kernel::g_object_pool.Create(directory);
diff --git a/src/core/hle/kernel/archive.h b/src/core/hle/kernel/archive.h
index 0230996b6..9c6015506 100644
--- a/src/core/hle/kernel/archive.h
+++ b/src/core/hle/kernel/archive.h
@@ -43,7 +43,7 @@ Handle CreateArchive(FileSys::Archive* backend, const std::string& name);
* @param mode Mode under which to open the File
* @return Opened File object
*/
-Handle OpenFileFromArchive(Handle archive_handle, const std::string& name, const FileSys::Mode mode);
+Handle OpenFileFromArchive(Handle archive_handle, const FileSys::Path& path, const FileSys::Mode mode);
/**
* Create a Directory from an Archive
@@ -51,7 +51,7 @@ Handle OpenFileFromArchive(Handle archive_handle, const std::string& name, const
* @param path Path to the Directory inside of the Archive
* @return Whether creation of directory succeeded
*/
-Result CreateDirectoryFromArchive(Handle archive_handle, const std::string& name);
+Result CreateDirectoryFromArchive(Handle archive_handle, const FileSys::Path& path);
/**
* Open a Directory from an Archive
@@ -59,7 +59,7 @@ Result CreateDirectoryFromArchive(Handle archive_handle, const std::string& name
* @param path Path to the Directory inside of the Archive
* @return Opened Directory object
*/
-Handle OpenDirectoryFromArchive(Handle archive_handle, const std::string& name);
+Handle OpenDirectoryFromArchive(Handle archive_handle, const FileSys::Path& path);
/// Initialize archives
void ArchiveInit();