From 2e06e0a3b01a6cc64ada0b3b2892473a14513f01 Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Mon, 10 Nov 2014 23:51:45 +0100 Subject: [PATCH] Refactor --- src/CryFuse.cpp | 2 +- src/cryfs_lib/CryDevice.cpp | 2 +- src/cryfs_lib/CryDevice.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CryFuse.cpp b/src/CryFuse.cpp index f1eba600..65447269 100644 --- a/src/CryFuse.cpp +++ b/src/CryFuse.cpp @@ -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(); diff --git a/src/cryfs_lib/CryDevice.cpp b/src/cryfs_lib/CryDevice.cpp index a4374815..652d440a 100644 --- a/src/cryfs_lib/CryDevice.cpp +++ b/src/cryfs_lib/CryDevice.cpp @@ -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()); diff --git a/src/cryfs_lib/CryDevice.h b/src/cryfs_lib/CryDevice.h index 6846413f..f5a97e9f 100644 --- a/src/cryfs_lib/CryDevice.h +++ b/src/cryfs_lib/CryDevice.h @@ -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: