fixes
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
55debcb643
commit
0650790c43
@ -733,17 +733,14 @@ auto winfsp_drive::Overwrite(PVOID /*file_node*/, PVOID file_desc,
|
|||||||
api_meta_map meta{};
|
api_meta_map meta{};
|
||||||
error = provider_.get_item_meta(api_path, meta);
|
error = provider_.get_item_meta(api_path, meta);
|
||||||
if (error == api_error::success) {
|
if (error == api_error::success) {
|
||||||
error = api_error::file_in_use;
|
|
||||||
if (not fm_->is_processing(api_path)) {
|
|
||||||
error = file->resize(0U);
|
error = file->resize(0U);
|
||||||
if (error == api_error::success) {
|
if (error == api_error::success) {
|
||||||
filesystem_item existing_fsi{};
|
filesystem_item existing_fsi{};
|
||||||
error =
|
error = provider_.get_filesystem_item(api_path, false, existing_fsi);
|
||||||
provider_.get_filesystem_item(api_path, false, existing_fsi);
|
|
||||||
if (error == api_error::success) {
|
if (error == api_error::success) {
|
||||||
// Handle replace attributes
|
// Handle replace attributes
|
||||||
if (replace_attributes != 0U) {
|
if (replace_attributes != 0U) {
|
||||||
if (attributes == 0U) {
|
if (attributes == 0U || attributes == FILE_ATTRIBUTE_NORMAL) {
|
||||||
attributes = FILE_ATTRIBUTE_ARCHIVE;
|
attributes = FILE_ATTRIBUTE_ARCHIVE;
|
||||||
}
|
}
|
||||||
meta[META_ATTRIBUTES] = std::to_string(attributes);
|
meta[META_ATTRIBUTES] = std::to_string(attributes);
|
||||||
@ -759,7 +756,6 @@ auto winfsp_drive::Overwrite(PVOID /*file_node*/, PVOID file_desc,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Populate file information
|
// Populate file information
|
||||||
populate_file_info(file->get_file_size(), meta, *file_info);
|
populate_file_info(file->get_file_size(), meta, *file_info);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user