Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9610093a authored by Songchun Fan's avatar Songchun Fan
Browse files

fix dir creation mode

They need to be writable by owner.

Test: manual
Change-Id: I3e99094e5752c0f6bb351cc24bdf5698b7a4bde2
parent 206a1b54
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@ auto IncrementalService::IncFsMount::makeStorage(StorageId id) -> StorageMap::it
        base::StringAppendF(&name, "%.*s_%d_%d", int(constants().storagePrefix.size()),
                            constants().storagePrefix.data(), id, no);
        auto fullName = path::join(root, constants().mount, name);
        if (auto err = incrementalService.mIncFs->makeDir(control, fullName); !err) {
        if (auto err = incrementalService.mIncFs->makeDir(control, fullName, 0755); !err) {
            std::lock_guard l(lock);
            return storages.insert_or_assign(id, Storage{std::move(fullName)}).first;
        } else if (err != EEXIST) {
+2 −2
Original line number Diff line number Diff line
@@ -109,8 +109,8 @@ public:

    int makeFile(StorageId storage, std::string_view path, int mode, FileId id,
                 incfs::NewFileParams params);
    int makeDir(StorageId storage, std::string_view path, int mode = 0555);
    int makeDirs(StorageId storage, std::string_view path, int mode = 0555);
    int makeDir(StorageId storage, std::string_view path, int mode = 0755);
    int makeDirs(StorageId storage, std::string_view path, int mode = 0755);

    int link(StorageId sourceStorageId, std::string_view oldPath, StorageId destStorageId,
             std::string_view newPath);
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ public:
    virtual ~IncFsWrapper() = default;
    virtual ErrorCode makeFile(Control control, std::string_view path, int mode, FileId id,
                               NewFileParams params) const = 0;
    virtual ErrorCode makeDir(Control control, std::string_view path, int mode = 0555) const = 0;
    virtual ErrorCode makeDir(Control control, std::string_view path, int mode) const = 0;
    virtual RawMetadata getMetadata(Control control, FileId fileid) const = 0;
    virtual RawMetadata getMetadata(Control control, std::string_view path) const = 0;
    virtual FileId getFileId(Control control, std::string_view path) const = 0;