1
0
Fork 0

Merge branch 'devel' of https://github.com/arangodb/arangodb into spdvpk

This commit is contained in:
jsteemann 2016-02-23 22:26:44 +01:00
commit c9974b60ab
1 changed files with 3 additions and 10 deletions

View File

@ -41,6 +41,7 @@
#include "Basics/tri-strings.h"
#include "Basics/threads.h"
#include "Basics/Exceptions.h"
#include "Basics/FileUtils.h"
#include "Utils/CollectionKeysRepository.h"
#include "Utils/CursorRepository.h"
#include "Utils/transactions.h"
@ -785,20 +786,12 @@ static int ScanPath(TRI_vocbase_t* vocbase, char const* path, bool isUpgrade,
for (auto const& name : files) {
TRI_ASSERT(!name.empty());
if (!StringUtils::isSuffix(name, "collection-")) {
if (!StringUtils::isPrefix(name, "collection-")) {
// no match, ignore this file
continue;
}
char* filePtr = TRI_Concatenate2File(path, name.c_str());
if (filePtr == nullptr) {
LOG(FATAL) << "out of memory";
FATAL_ERROR_EXIT();
}
std::string file = filePtr;
TRI_FreeString(TRI_CORE_MEM_ZONE, filePtr);
std::string file = FileUtils::buildFilename(path, name);
if (TRI_IsDirectory(file.c_str())) {
if (!TRI_IsWritable(file.c_str())) {