[bug] Windows-to-Linux remote mount is allowing directory rename when directory is not empty #47
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
This commit is contained in:
parent
7487caca2a
commit
011d32f9cf
@ -1740,6 +1740,7 @@ auto remote_server::update_to_windows_format(const std::string &root_api_path,
|
||||
}
|
||||
|
||||
item[JSON_DIRECTORY] = true;
|
||||
meta[META_DIRECTORY] = utils::string::to_bool(true);
|
||||
item[JSON_META] = meta;
|
||||
}
|
||||
|
||||
|
@ -314,20 +314,26 @@ auto base_provider::get_directory_items(const std::string &api_path,
|
||||
(item1.api_path.compare(item2.api_path) < 0));
|
||||
});
|
||||
|
||||
list.insert(list.begin(), directory_item{
|
||||
"..",
|
||||
"",
|
||||
true,
|
||||
0U,
|
||||
{},
|
||||
});
|
||||
list.insert(list.begin(), directory_item{
|
||||
".",
|
||||
"",
|
||||
true,
|
||||
0U,
|
||||
{},
|
||||
});
|
||||
list.insert(list.begin(),
|
||||
directory_item{
|
||||
"..",
|
||||
"",
|
||||
true,
|
||||
0U,
|
||||
{
|
||||
{META_DIRECTORY, utils::string::from_bool(true)},
|
||||
},
|
||||
});
|
||||
list.insert(list.begin(),
|
||||
directory_item{
|
||||
".",
|
||||
"",
|
||||
true,
|
||||
0U,
|
||||
{
|
||||
{META_DIRECTORY, utils::string::from_bool(true)},
|
||||
},
|
||||
});
|
||||
return api_error::success;
|
||||
}
|
||||
|
||||
|
@ -284,20 +284,26 @@ auto encrypt_provider::get_directory_items(const std::string &api_path,
|
||||
(item1.api_path.compare(item2.api_path) < 0));
|
||||
});
|
||||
|
||||
list.insert(list.begin(), directory_item{
|
||||
"..",
|
||||
"",
|
||||
true,
|
||||
0U,
|
||||
{},
|
||||
});
|
||||
list.insert(list.begin(), directory_item{
|
||||
".",
|
||||
"",
|
||||
true,
|
||||
0U,
|
||||
{},
|
||||
});
|
||||
list.insert(list.begin(),
|
||||
directory_item{
|
||||
"..",
|
||||
"",
|
||||
true,
|
||||
0U,
|
||||
{
|
||||
{META_DIRECTORY, utils::string::from_bool(true)},
|
||||
},
|
||||
});
|
||||
list.insert(list.begin(),
|
||||
directory_item{
|
||||
".",
|
||||
"",
|
||||
true,
|
||||
0U,
|
||||
{
|
||||
{META_DIRECTORY, utils::string::from_bool(true)},
|
||||
},
|
||||
});
|
||||
return api_error::success;
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user