fs.mitm: fix logic error in CopyFile

This commit is contained in:
Michael Scire 2019-04-04 15:41:41 -07:00
parent 08a2f02a7c
commit fb5e02050b

View file

@ -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<size_t>(snprintf(dst_path.str, sizeof(dst_path.str), "%s%s", dst_parent_path.str, src_path.str)) >= sizeof(dst_path)) {
if (static_cast<size_t>(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();
}