fixes
This commit is contained in:
@ -70,8 +70,11 @@ auto smb_file::exists() const -> bool {
|
||||
throw std::runtime_error("session not found|" + path_);
|
||||
}
|
||||
|
||||
smb_stat_t st{smb_fstat(session_.get(), tid_,
|
||||
smb_create_relative_path(path_).c_str())};
|
||||
smb_stat_t st{
|
||||
smb_fstat(session_.get(), tid_,
|
||||
smb_create_relative_path(path_).c_str()),
|
||||
smb_stat_deleter(),
|
||||
};
|
||||
if (not st) {
|
||||
return false;
|
||||
}
|
||||
@ -113,7 +116,10 @@ auto smb_file::get_time(smb_session *session, smb_tid tid, std::string path,
|
||||
}
|
||||
|
||||
auto rel_path = smb_create_relative_path(path);
|
||||
smb_stat_t st{smb_fstat(session, tid, rel_path.c_str())};
|
||||
smb_stat_t st{
|
||||
smb_fstat(session, tid, rel_path.c_str()),
|
||||
smb_stat_deleter(),
|
||||
};
|
||||
if (not st) {
|
||||
throw std::runtime_error("failed to stat directory|" + rel_path);
|
||||
}
|
||||
@ -368,7 +374,10 @@ auto smb_file::size() const -> std::optional<std::uint64_t> {
|
||||
}
|
||||
|
||||
auto rel_path = smb_create_relative_path(path_);
|
||||
smb_stat_t st{smb_fstat(session_.get(), tid_, rel_path.c_str())};
|
||||
smb_stat_t st{
|
||||
smb_fstat(session_.get(), tid_, rel_path.c_str()),
|
||||
smb_stat_deleter(),
|
||||
};
|
||||
if (not st) {
|
||||
throw std::runtime_error("failed to stat directory|" + rel_path);
|
||||
}
|
||||
|
Reference in New Issue
Block a user