Merge "fix dir creation mode"
This commit is contained in:
committed by
Android (Google) Code Review
commit
1a79ff69de
@@ -170,7 +170,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) {
|
||||
|
||||
@@ -110,8 +110,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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user