From 664d9d1771d43550c3e452915348bbbcc1038947 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Wed, 9 Oct 2013 14:05:57 +0200 Subject: [PATCH] Catalog setSize() and utime() implementation. --- src/VfsNs.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/VfsNs.cpp b/src/VfsNs.cpp index a11d958..b1787ac 100644 --- a/src/VfsNs.cpp +++ b/src/VfsNs.cpp @@ -1,6 +1,8 @@ /// @file VfsNs.cpp /// @brief VFS namespace. /// @author Alejandro Álvarez Ayllón +#include +#include #include #include #include @@ -216,7 +218,7 @@ void VfsCatalog::setOwner(const std::string& path, uid_t newUid, gid_t newGid, b void VfsCatalog::setSize(const std::string& path, size_t newSize) throw (DmException) { - throw DmException(EACCES, "Write mode not supported"); + wrapCall(truncate(path.c_str(), newSize)); } @@ -239,7 +241,7 @@ void VfsCatalog::setAcl(const std::string& path, const Acl& acl) throw (DmExcept void VfsCatalog::utime(const std::string& path, const struct utimbuf* buf) throw (DmException) { - throw DmException(EACCES, "Write mode not supported"); + utime(path.c_str(), buf); } -- 1.8.2.3