[bug] Windows-to-Linux remote mount is allowing directory rename when directory is not empty #47
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
This commit is contained in:
parent
13b2ee6f7a
commit
f921295dbd
@ -1730,7 +1730,7 @@ auto remote_server::update_to_windows_format(const std::string &root_api_path,
|
|||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
item[JSON_DIRECTORY] = utils::string::from_bool(true);
|
item[JSON_DIRECTORY] = true;
|
||||||
item[JSON_META] = meta;
|
item[JSON_META] = meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1757,7 +1757,7 @@ auto remote_server::update_to_windows_format(const std::string &root_api_path,
|
|||||||
|
|
||||||
auto attributes = utils::string::to_uint32(
|
auto attributes = utils::string::to_uint32(
|
||||||
item[JSON_META][META_ATTRIBUTES].get<std::string>());
|
item[JSON_META][META_ATTRIBUTES].get<std::string>());
|
||||||
if (utils::string::to_bool(item[JSON_DIRECTORY].get<std::string>())) {
|
if (item[JSON_DIRECTORY].get<bool>()) {
|
||||||
if ((attributes & FILE_ATTRIBUTE_DIRECTORY) != FILE_ATTRIBUTE_DIRECTORY) {
|
if ((attributes & FILE_ATTRIBUTE_DIRECTORY) != FILE_ATTRIBUTE_DIRECTORY) {
|
||||||
attributes |= FILE_ATTRIBUTE_DIRECTORY;
|
attributes |= FILE_ATTRIBUTE_DIRECTORY;
|
||||||
attributes &= static_cast<std::uint32_t>(~FILE_ATTRIBUTE_ARCHIVE);
|
attributes &= static_cast<std::uint32_t>(~FILE_ATTRIBUTE_ARCHIVE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user