git://scientific.zcu.cz
/
dmlite-plugins-vfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3733eb6
)
test-rename test hack.
author
František Dvořák
<valtri@civ.zcu.cz>
Thu, 10 Oct 2013 12:44:13 +0000
(14:44 +0200)
committer
František Dvořák
<valtri@civ.zcu.cz>
Thu, 10 Oct 2013 12:44:13 +0000
(14:44 +0200)
src/VfsNs.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/VfsNs.cpp
b/src/VfsNs.cpp
index
3309244
..
a6ff7bf
100644
(file)
--- a/
src/VfsNs.cpp
+++ b/
src/VfsNs.cpp
@@
-380,7
+380,14
@@
void VfsCatalog::makeDir(const std::string& path, mode_t mode) throw (DmExceptio
void VfsCatalog::rename(const std::string& oldPath, const std::string& newPath) throw (DmException)
{
- wrapCall(::rename(oldPath.c_str(), newPath.c_str()));
+ // XXX: test-rename should probably accept both ENOTEMPTY and EEXIST instead
+ // of changing it here?
+ try {
+ wrapCall(::rename(oldPath.c_str(), newPath.c_str()));
+ } catch (DmException e) {
+ if (e.code() == ENOTEMPTY) e = DmException(EEXIST, e.what());
+ throw e;
+ }
}