From b85da9a688b0b3cb483d57a15860d0281835bf2c Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Wed, 12 Nov 2014 12:34:35 +0100 Subject: [PATCH] rmdir --- src/CryFuse.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/CryFuse.cpp b/src/CryFuse.cpp index 313d2a8b..f8521697 100644 --- a/src/CryFuse.cpp +++ b/src/CryFuse.cpp @@ -100,12 +100,13 @@ int CryFuse::unlink(const path &path) { } } -//TODO int CryFuse::rmdir(const path &path) { - //printf("rmdir(%s)\n", path.c_str()); - auto real_path = _device->RootDir() / path; - int retstat = ::rmdir(real_path.c_str()); - return errcode_map(retstat); + try { + _device->rmdir(path); + return 0; + } catch(cryfs::CryErrnoException &e) { + return -e.getErrno(); + } } //TODO