This commit is contained in:
Sebastian Messmer 2014-11-12 12:31:38 +01:00
parent c5e8c37588
commit 3727dd8b74

View File

@ -90,12 +90,14 @@ int CryFuse::mkdir(const path &path, mode_t mode) {
}
}
//TODO
int CryFuse::unlink(const path &path) {
//printf("unlink(%s)\n", path.c_str());
auto real_path = _device->RootDir() / path;
int retstat = ::unlink(real_path.c_str());
return errcode_map(retstat);
try {
_device->unlink(path);
return 0;
} catch(cryfs::CryErrnoException &e) {
return -e.getErrno();
}
}
//TODO