diff --git a/rpcs3/Emu/VFS.cpp b/rpcs3/Emu/VFS.cpp index 575427e37e..966214a31e 100644 --- a/rpcs3/Emu/VFS.cpp +++ b/rpcs3/Emu/VFS.cpp @@ -14,6 +14,8 @@ #include +LOG_CHANNEL(vfs_log, "VFS"); + struct vfs_directory { // Real path (empty if root or not exists) @@ -45,9 +47,12 @@ bool vfs::mount(std::string_view vpath, std::string_view path) if (vpath.empty()) { // Empty relative path, should set relative path base; unsupported + vfs_log.error("Cannot mount empty path to \"%s\"", path); return false; } + const std::string_view vpath_backup = vpath; + for (std::vector list{&table.root};;) { // Skip one or more '/' @@ -56,6 +61,7 @@ bool vfs::mount(std::string_view vpath, std::string_view path) if (pos == 0) { // Mounting relative path is not supported + vfs_log.error("Cannot mount relative path \"%s\" to \"%s\"", vpath_backup, path); return false; } @@ -63,6 +69,7 @@ bool vfs::mount(std::string_view vpath, std::string_view path) { // Mounting completed list.back()->path = path; + vfs_log.notice("Mounted path \"%s\" to \"%s\"", vpath_backup, path); return true; }