diff options
author | Vincent Richard <[email protected]> | 2009-12-01 14:24:55 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2009-12-01 14:24:55 +0000 |
commit | 82e1a690d97cd9d9f392beccbb6b1d35f3573f08 (patch) | |
tree | bf6097c08872b3404771e7a92fff7be3d6e1ee00 /src/platforms/posix/posixFile.cpp | |
parent | Added option to return ISO week-numbering instead of default calendar-numbering. (diff) | |
download | vmime-82e1a690d97cd9d9f392beccbb6b1d35f3573f08.tar.gz vmime-82e1a690d97cd9d9f392beccbb6b1d35f3573f08.zip |
Fixed directory renaming.
Diffstat (limited to '')
-rw-r--r-- | src/platforms/posix/posixFile.cpp | 6 |
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); |