8000 Improve startup file copying of JavaScript files by jsteemann · Pull Request #14512 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Improve startup file copying of JavaScript files #14512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 19, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
try to fix compile issue on Windows
  • Loading branch information
jsteemann committed Jul 16, 2021
commit 0833fbb0ddaa8230f348e914f24737bb2b0185fa
13 changes: 7 additions & 6 deletions lib/Basics/FileUtils.cpp
939E
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,13 @@ bool copyDirectoryRecursive(std::string const& source, std::string const& target
std::function<TRI_copy_recursive_e(std::string const&)> const& filter,
std::string& error) {
bool rc_bool = true;

// these strings will be recycled over and over
std::string dst = target + TRI_DIR_SEPARATOR_STR;
size_t const dstPrefixLength = dst.size();
std::string src = source + TRI_DIR_SEPARATOR_STR;
size_t const srcPrefixLength = src.size();


#ifdef TRI_HAVE_WIN32_LIST_FILES
struct _wfinddata_t oneItem;
Expand Down Expand Up @@ -476,12 +483,6 @@ bool copyDirectoryRecursive(std::string const& source, std::string const& target

struct dirent* oneItem = nullptr;

// these strings will be recycled over and over
std::string dst = target + TRI_DIR_SEPARATOR_STR;
size_t dstPrefixLength = dst.size();
std::string src = source + TRI_DIR_SEPARATOR_STR;
size_t srcPrefixLength = src.size();

// do not use readdir_r() here anymore as it is not safe and deprecated
// in newer versions of libc:
// http://man7.org/linux/man-pages/man3/readdir_r.3.html
Expand Down
0