mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-21 10:25:08 -04:00
libstrat: enable -Wextra, -Werror
This caught an embarrassingly large number of bugs.
This commit is contained in:
parent
e1fbf27398
commit
7ca83c9d3b
160 changed files with 691 additions and 152 deletions
|
@ -108,12 +108,16 @@ namespace ams::fssystem {
|
|||
|
||||
return IterateDirectoryRecursively(src_fs, src_path,
|
||||
[&](const char *path, const fs::DirectoryEntry &entry) -> Result { /* On Enter Directory */
|
||||
AMS_UNUSED(path);
|
||||
|
||||
/* Update path, create new dir. */
|
||||
std::strncat(dst_path_buf, entry.name, sizeof(dst_path_buf) - strnlen(dst_path_buf, sizeof(dst_path_buf) - 1) - 1);
|
||||
std::strncat(dst_path_buf, "/", sizeof(dst_path_buf) - strnlen(dst_path_buf, sizeof(dst_path_buf) - 1) - 1);
|
||||
return dst_fs->CreateDirectory(dst_path_buf);
|
||||
},
|
||||
[&](const char *path, const fs::DirectoryEntry &entry) -> Result { /* On Exit Directory */
|
||||
AMS_UNUSED(path, entry);
|
||||
|
||||
/* Check we have a parent directory. */
|
||||
const size_t len = strnlen(dst_path_buf, sizeof(dst_path_buf));
|
||||
R_UNLESS(len >= 2, fs::ResultInvalidPathFormat());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue