aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2009-12-01 14:24:55 +0000
committerVincent Richard <[email protected]>2009-12-01 14:24:55 +0000
commit82e1a690d97cd9d9f392beccbb6b1d35f3573f08 (patch)
treebf6097c08872b3404771e7a92fff7be3d6e1ee00 /src
parentAdded option to return ISO week-numbering instead of default calendar-numbering. (diff)
downloadvmime-82e1a690d97cd9d9f392beccbb6b1d35f3573f08.tar.gz
vmime-82e1a690d97cd9d9f392beccbb6b1d35f3573f08.zip
Fixed directory renaming.
Diffstat (limited to 'src')
-rw-r--r--src/platforms/posix/posixFile.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/platforms/posix/posixFile.cpp b/src/platforms/posix/posixFile.cpp
index 7ee9f197..b814b758 100644
--- a/src/platforms/posix/posixFile.cpp
+++ b/src/platforms/posix/posixFile.cpp
@@ -396,7 +396,11 @@ void posixFile::rename(const path& newName)
const vmime::string newNativePath = posixFileSystemFactory::pathToStringImpl(newName);
posixFile dest(newName);
- dest.createFile();
+
+ if (isDirectory())
+ dest.createDirectory();
+ else
+ dest.createFile();
if (::rename(m_nativePath.c_str(), newNativePath.c_str()) == -1)
posixFileSystemFactory::reportError(m_path, errno);