From fb5e02050b6d8c7f867beedd5cd708e182f1b751 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 4 Apr 2019 15:41:41 -0700 Subject: [PATCH] fs.mitm: fix logic error in CopyFile --- stratosphere/ams_mitm/source/fs_mitm/fs_dir_utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratosphere/ams_mitm/source/fs_mitm/fs_dir_utils.cpp b/stratosphere/ams_mitm/source/fs_mitm/fs_dir_utils.cpp index 58a727aeb..aba5e0369 100644 --- a/stratosphere/ams_mitm/source/fs_mitm/fs_dir_utils.cpp +++ b/stratosphere/ams_mitm/source/fs_mitm/fs_dir_utils.cpp @@ -34,7 +34,7 @@ Result FsDirUtils::CopyFile(IFileSystem *dst_fs, IFileSystem *src_fs, const FsPa /* Create and open destination file. */ { FsPath dst_path; - if (static_cast(snprintf(dst_path.str, sizeof(dst_path.str), "%s%s", dst_parent_path.str, src_path.str)) >= sizeof(dst_path)) { + if (static_cast(snprintf(dst_path.str, sizeof(dst_path.str), "%s%s", dst_parent_path.str, dir_ent->name)) >= sizeof(dst_path)) { /* TODO: Error code? N aborts here. */ std::abort(); }