mirror of https://gitee.com/bigwinds/arangodb
ignore files in .bin when copying js files (#10146)
* ignore files in .bin when copying js files * updated CHANGELOG * updated CHANGELOG
This commit is contained in:
parent
455cccefbb
commit
4425c7d73a
|
@ -1,6 +1,13 @@
|
||||||
v3.5.1 (XXXX-XX-XX)
|
v3.5.1 (XXXX-XX-XX)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
* Ignore symlinks when copying JavaScript files at startup via the option
|
||||||
|
`--javascript.copy-installation`. This potentially fixes the following
|
||||||
|
error message at startup:
|
||||||
|
|
||||||
|
Error copying JS installation files to '...':
|
||||||
|
failed to open source file ...: No such file or directory
|
||||||
|
|
||||||
* Added startup option `--cluster.max-number-of-shards` for restricting the
|
* Added startup option `--cluster.max-number-of-shards` for restricting the
|
||||||
maximum number of shards when creating new collections. The default
|
maximum number of shards when creating new collections. The default
|
||||||
value for this setting is `1000`, which is also the previously hard-coded
|
value for this setting is `1000`, which is also the previously hard-coded
|
||||||
|
|
|
@ -499,8 +499,14 @@ void V8DealerFeature::copyInstallationFiles() {
|
||||||
std::string const nodeModulesPathVersioned =
|
std::string const nodeModulesPathVersioned =
|
||||||
basics::FileUtils::buildFilename("js", versionAppendix, "node",
|
basics::FileUtils::buildFilename("js", versionAppendix, "node",
|
||||||
"node_modules");
|
"node_modules");
|
||||||
auto filter = [&nodeModulesPath,
|
|
||||||
&nodeModulesPathVersioned](std::string const& filename) -> bool {
|
std::regex const binRegex("[/\\\\]\\.bin[/\\\\]", std::regex::ECMAScript);
|
||||||
|
|
||||||
|
auto filter = [&nodeModulesPath, &nodeModulesPathVersioned, &binRegex](std::string const& filename) -> bool {
|
||||||
|
if (std::regex_search(filename, binRegex)) {
|
||||||
|
// don't copy files in .bin
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (filename.size() >= nodeModulesPath.size()) {
|
if (filename.size() >= nodeModulesPath.size()) {
|
||||||
std::string normalized = filename;
|
std::string normalized = filename;
|
||||||
FileUtils::normalizePath(normalized);
|
FileUtils::normalizePath(normalized);
|
||||||
|
|
|
@ -464,7 +464,7 @@ bool copyDirectoryRecursive(std::string const& source, std::string const& target
|
||||||
if (isSubDirectory(src)) {
|
if (isSubDirectory(src)) {
|
||||||
long systemError;
|
long systemError;
|
||||||
int rc = TRI_CreateDirectory(dst.c_str(), systemError, error);
|
int rc = TRI_CreateDirectory(dst.c_str(), systemError, error);
|
||||||
if (rc != TRI_ERROR_NO_ERROR) {
|
if (rc != TRI_ERROR_NO_ERROR && rc != TRI_ERROR_FILE_EXISTS) {
|
||||||
rc_bool = false;
|
rc_bool = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue