fix linux
This commit is contained in:
@@ -403,7 +403,11 @@ auto remote_fuse_drive::readdir_impl(std::string api_path, void *buf,
|
|||||||
p_stat = std::make_unique<struct stat>();
|
p_stat = std::make_unique<struct stat>();
|
||||||
std::memset(p_stat.get(), 0, sizeof(struct stat));
|
std::memset(p_stat.get(), 0, sizeof(struct stat));
|
||||||
if (item_path == ".") {
|
if (item_path == ".") {
|
||||||
|
#if FUSE_USE_VERSION >= 30
|
||||||
|
stat_res = getattr_impl(api_path, p_stat.get(), f_info);
|
||||||
|
#else // FUSE_USE_VERSION < 30
|
||||||
stat_res = getattr_impl(api_path, p_stat.get());
|
stat_res = getattr_impl(api_path, p_stat.get());
|
||||||
|
#endif // FUSE_USE_VERSION >= 30
|
||||||
} else if (api_path == "/" && get_mount_location() != "/") {
|
} else if (api_path == "/" && get_mount_location() != "/") {
|
||||||
auto local_res =
|
auto local_res =
|
||||||
stat(utils::path::get_parent_path(get_mount_location()).c_str(),
|
stat(utils::path::get_parent_path(get_mount_location()).c_str(),
|
||||||
@@ -413,8 +417,13 @@ auto remote_fuse_drive::readdir_impl(std::string api_path, void *buf,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
#if FUSE_USE_VERSION >= 30
|
||||||
|
stat_res = getattr_impl(utils::path::get_parent_api_path(api_path),
|
||||||
|
p_stat.get(), f_info);
|
||||||
|
#else // FUSE_USE_VERSION < 30
|
||||||
stat_res = getattr_impl(utils::path::get_parent_api_path(api_path),
|
stat_res = getattr_impl(utils::path::get_parent_api_path(api_path),
|
||||||
p_stat.get());
|
p_stat.get());
|
||||||
|
#endif // FUSE_USE_VERSION >= 30
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stat_res != api_error::success) {
|
if (stat_res != api_error::success) {
|
||||||
|
Reference in New Issue
Block a user