This commit is contained in:
parent
fe0fef2f21
commit
54b70f99cc
@ -103,7 +103,7 @@ protected:
|
|||||||
struct fuse_file_info *file_info) -> api_error override;
|
struct fuse_file_info *file_info) -> api_error override;
|
||||||
|
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto
|
||||||
fgetattr_impl(std::string api_path, struct stat *st,
|
fgetattr_impl(std::string api_path, struct stat *unix_st,
|
||||||
struct fuse_file_info *file_info) -> api_error override;
|
struct fuse_file_info *file_info) -> api_error override;
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
@ -124,11 +124,11 @@ protected:
|
|||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
[[nodiscard]] auto
|
[[nodiscard]] auto
|
||||||
getattr_impl(std::string api_path, struct stat *st,
|
getattr_impl(std::string api_path, struct stat *unix_st,
|
||||||
struct fuse_file_info *file_info) -> api_error override;
|
struct fuse_file_info *file_info) -> api_error override;
|
||||||
#else
|
#else
|
||||||
[[nodiscard]] auto getattr_impl(std::string api_path,
|
[[nodiscard]] auto getattr_impl(std::string api_path,
|
||||||
struct stat *st) -> api_error override;
|
struct stat *unix_st) -> api_error override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
|
@ -337,7 +337,7 @@ auto fuse_drive::fallocate_impl(std::string /*api_path*/, int mode,
|
|||||||
static_cast<std::uint64_t>(offset + length), allocator);
|
static_cast<std::uint64_t>(offset + length), allocator);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto fuse_drive::fgetattr_impl(std::string api_path, struct stat *st,
|
auto fuse_drive::fgetattr_impl(std::string api_path, struct stat *unix_st,
|
||||||
struct fuse_file_info *file_info) -> api_error {
|
struct fuse_file_info *file_info) -> api_error {
|
||||||
std::shared_ptr<i_open_file> open_file;
|
std::shared_ptr<i_open_file> open_file;
|
||||||
if (not fm_->get_open_file(file_info->fh, false, open_file)) {
|
if (not fm_->get_open_file(file_info->fh, false, open_file)) {
|
||||||
@ -356,7 +356,7 @@ auto fuse_drive::fgetattr_impl(std::string api_path, struct stat *st,
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
fuse_drive_base::populate_stat(api_path, open_file->get_file_size(), meta,
|
fuse_drive_base::populate_stat(api_path, open_file->get_file_size(), meta,
|
||||||
directory, provider_, st);
|
directory, provider_, unix_st);
|
||||||
|
|
||||||
return api_error::success;
|
return api_error::success;
|
||||||
}
|
}
|
||||||
@ -464,12 +464,12 @@ auto fuse_drive::get_item_meta(const std::string &api_path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if FUSE_USE_VERSION >= 30
|
#if FUSE_USE_VERSION >= 30
|
||||||
auto fuse_drive::getattr_impl(std::string api_path, struct stat *st,
|
auto fuse_drive::getattr_impl(std::string api_path, struct stat *unix_st,
|
||||||
struct fuse_file_info * /*file_info*/)
|
struct fuse_file_info * /*file_info*/)
|
||||||
-> api_error {
|
-> api_error {
|
||||||
#else
|
#else
|
||||||
auto fuse_drive::getattr_impl(std::string api_path,
|
auto fuse_drive::getattr_impl(std::string api_path,
|
||||||
struct stat *st) -> api_error {
|
struct stat *unix_st) -> api_error {
|
||||||
#endif
|
#endif
|
||||||
auto parent = utils::path::get_parent_api_path(api_path);
|
auto parent = utils::path::get_parent_api_path(api_path);
|
||||||
|
|
||||||
@ -484,7 +484,7 @@ auto fuse_drive::getattr_impl(std::string api_path,
|
|||||||
found = (iter.get_directory_item(api_path, dir_item) == api_error::success);
|
found = (iter.get_directory_item(api_path, dir_item) == api_error::success);
|
||||||
if (found) {
|
if (found) {
|
||||||
fuse_drive_base::populate_stat(api_path, dir_item.size, dir_item.meta,
|
fuse_drive_base::populate_stat(api_path, dir_item.size, dir_item.meta,
|
||||||
dir_item.directory, provider_, st);
|
dir_item.directory, provider_, unix_st);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -502,7 +502,7 @@ auto fuse_drive::getattr_impl(std::string api_path,
|
|||||||
}
|
}
|
||||||
fuse_drive_base::populate_stat(api_path,
|
fuse_drive_base::populate_stat(api_path,
|
||||||
utils::string::to_uint64(meta[META_SIZE]),
|
utils::string::to_uint64(meta[META_SIZE]),
|
||||||
meta, directory, provider_, st);
|
meta, directory, provider_, unix_st);
|
||||||
}
|
}
|
||||||
|
|
||||||
return api_error::success;
|
return api_error::success;
|
||||||
@ -753,13 +753,14 @@ auto fuse_drive::readdir_impl(std::string api_path, void *buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (res == api_error::success) {
|
while (res == api_error::success) {
|
||||||
res = (iter->fill_buffer(
|
res =
|
||||||
|
(iter->fill_buffer(
|
||||||
static_cast<remote::file_offset>(offset++), fuse_fill_dir, buf,
|
static_cast<remote::file_offset>(offset++), fuse_fill_dir, buf,
|
||||||
[this](const std::string &cur_api_path,
|
[this](const std::string &cur_api_path,
|
||||||
std::uint64_t cur_file_size, const api_meta_map &meta,
|
std::uint64_t cur_file_size, const api_meta_map &meta,
|
||||||
bool directory, struct stat *st) {
|
bool directory, struct stat *unix_st) {
|
||||||
fuse_drive_base::populate_stat(cur_api_path, cur_file_size,
|
fuse_drive_base::populate_stat(cur_api_path, cur_file_size, meta,
|
||||||
meta, directory, provider_, st);
|
directory, provider_, unix_st);
|
||||||
}) == 0)
|
}) == 0)
|
||||||
? api_error::success
|
? api_error::success
|
||||||
: api_error::os_error;
|
: api_error::os_error;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user