语法问题修复

This commit is contained in:
shell committed 2026-08-02 21:31:46 +08:00
1 parent 45060f03b6
commit ff5917ffbd
3 files changed
+5 -7

No files matched your search

+3 -2
View File
@@ -65,7 +65,7 @@ namespace seafile::fs
[[nodiscard]] tl::expected<api::AccountInfo, api::SeafileException> accountInfo() const; [[nodiscard]] tl::expected<api::AccountInfo, api::SeafileException> accountInfo() const;
/// 同步用户信息 /// 同步用户信息
[[nodiscard]] tl::expected<void, api::SeafileException> syncUserInfo(); [[nodiscard]] tl::expected<void, api::SeafileException> syncUserInfo() const;
/// 同步repo信息 /// 同步repo信息
[[nodiscard]] tl::expected<std::vector<storage::RepoInfo>, api::SeafileException> syncRepos(); [[nodiscard]] tl::expected<std::vector<storage::RepoInfo>, api::SeafileException> syncRepos();
@@ -76,6 +76,7 @@ namespace seafile::fs
static std::filesystem::path storePath(); static std::filesystem::path storePath();
/// 获取路径信息 /// 获取路径信息
/// @param repo_id repo id
/// @param path 路径 /// @param path 路径
/// @return 路径信息 /// @return 路径信息
tl::expected<storage::RepoEntry, api::SeafileException> findRepoEntry( tl::expected<storage::RepoEntry, api::SeafileException> findRepoEntry(
@@ -85,7 +86,7 @@ namespace seafile::fs
tl::expected<storage::RepoInfo, api::SeafileException> findRepoByName(const std::string& name); tl::expected<storage::RepoInfo, api::SeafileException> findRepoByName(const std::string& name);
tl::expected<void, api::SeafileException> fetchAndStoreRepoDir( tl::expected<void, api::SeafileException> fetchAndStoreRepoDir(
const std::string& repo_id, const std::string& parent_path); const std::string& repo_id, const std::string& parent_path) const;
std::vector<storage::RepoEntry> queryDirectoryChildren( std::vector<storage::RepoEntry> queryDirectoryChildren(
const std::string& repo_id, const std::string& parent_path); const std::string& repo_id, const std::string& parent_path);
-1
View File
@@ -4,7 +4,6 @@
#ifndef SEADISK_UNITS_HPP #ifndef SEADISK_UNITS_HPP
#define SEADISK_UNITS_HPP #define SEADISK_UNITS_HPP
#include <cstddef>
namespace seafile::literals { namespace seafile::literals {
constexpr std::size_t operator ""_B(unsigned long long v) { constexpr std::size_t operator ""_B(unsigned long long v) {
+2 -4
View File
@@ -301,8 +301,7 @@ namespace seafile::fs
return this->sync(); return this->sync();
} }
tl::expected<void, api::SeafileException> SeafileStore::syncUserInfo() tl::expected<void, api::SeafileException> SeafileStore::syncUserInfo() const {
{
const auto user_info = this->api.accountInfo(); const auto user_info = this->api.accountInfo();
if (!user_info) if (!user_info)
{ {
@@ -388,8 +387,7 @@ namespace seafile::fs
} }
tl::expected<void, api::SeafileException> SeafileStore::fetchAndStoreRepoDir( tl::expected<void, api::SeafileException> SeafileStore::fetchAndStoreRepoDir(
const std::string& repo_id, const std::string& parent_path) const std::string& repo_id, const std::string& parent_path) const {
{
const auto entries = this->api.repoDir(repo_id, parent_path); const auto entries = this->api.repoDir(repo_id, parent_path);
if (!entries) if (!entries)
{ {