Refactor
This commit is contained in:
parent
ca745bb3da
commit
2e06e0a3b0
@ -327,7 +327,7 @@ int CryFuse::access(const path &path, int mask) {
|
||||
int CryFuse::create(const path &path, mode_t mode, fuse_file_info *fileinfo) {
|
||||
//printf("create(%s, %d, _)\n", path.c_str(), mode);
|
||||
try {
|
||||
fileinfo->fh = _device->createFile(path, mode);
|
||||
fileinfo->fh = _device->createAndOpenFile(path, mode);
|
||||
return 0;
|
||||
} catch (CryErrnoException &e) {
|
||||
return -e.getErrno();
|
||||
|
@ -94,7 +94,7 @@ void CryDevice::access(const bf::path &path, int mask) {
|
||||
Load(path)->access(mask);
|
||||
}
|
||||
|
||||
int CryDevice::createFile(const bf::path &path, mode_t mode) {
|
||||
int CryDevice::createAndOpenFile(const bf::path &path, mode_t mode) {
|
||||
//TODO Creating the file opens and closes it. We then reopen it afterwards.
|
||||
// This is slow. Improve!
|
||||
auto dir = LoadDir(path.parent_path());
|
||||
|
@ -33,7 +33,7 @@ public:
|
||||
void fsync(int descriptor);
|
||||
void fdatasync(int descriptor);
|
||||
void access(const bf::path &path, int mask);
|
||||
int createFile(const bf::path &path, mode_t mode);
|
||||
int createAndOpenFile(const bf::path &path, mode_t mode);
|
||||
|
||||
const bf::path &RootDir() const;
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user