links must have unique names by design
This commit is contained in:
parent
9af73a9de8
commit
25069b5bbe
5 changed files with 13714 additions and 6198 deletions
|
|
@ -6,8 +6,6 @@
|
|||
#include <sstream>
|
||||
|
||||
// copy operator exit if exists, do not rename
|
||||
// links have unique names
|
||||
// update link if exists
|
||||
|
||||
class FileSystem {
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ bool FileSystem::makeLink(const Path& source, const Path& target, bool isDynamic
|
|||
return false;
|
||||
}
|
||||
|
||||
const Key& key = source.getFilename();
|
||||
const Key& key = isDynamic ? "dlink" : "hlink";
|
||||
|
||||
if (parentNodeTarget->findNode(key)) {
|
||||
gError = "Node with such name already exists";
|
||||
|
|
|
|||
|
|
@ -68,8 +68,7 @@ void Link::dumpUtil(std::ostream& ss, const Key& key, ui32 currentDepth, std::ve
|
|||
|
||||
indent(ss, currentDepth, indents);
|
||||
|
||||
ss << key;
|
||||
ss << (isHardLink() ? " hlink[" : " dlink[");
|
||||
ss << key << "[";
|
||||
// ss << " [h" << mIncomingHardLinks.size() << ": d" << mIncomingDynamicLinks.size() << "] ";
|
||||
|
||||
for (auto it = path.begin(); it != path.end(); ++it) {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ SUITE(FSE) {
|
|||
CHECK(interp("copy a C:/"));
|
||||
CHECK(!interp("deltree a"));
|
||||
CHECK(interp("deltree a_copy"));
|
||||
CHECK(interp("del a/b/a"));
|
||||
CHECK(interp("del a/b/hlink"));
|
||||
CHECK(interp("deltree a"));
|
||||
|
||||
CHECK(interp("md a"));
|
||||
|
|
|
|||
19903
test/consistency/state
19903
test/consistency/state
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue