loolwsd/LOOLKit.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-)
New commits: commit 23672ac3626ff2d0691506ac60a81883ca37f738 Author: Michael Meeks <michael.me...@collabora.com> Date: Fri Apr 1 23:01:31 2016 +0100 Build jails more sparingly eliding un-necessary directories. Create directories top-down and not bottom up for more efficiency too. Skip the sdk (if we have it) - ~20k files, and misc. other pieces that we don't need; still more to go there. Change-Id: Iccd9ebac495fba414d268b339ef82a161d98a9ca Reviewed-on: https://gerrit.libreoffice.org/23770 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp index f8699b3..2794609 100644 --- a/loolwsd/LOOLKit.cpp +++ b/loolwsd/LOOLKit.cpp @@ -104,7 +104,7 @@ namespace std::exit(Application::EXIT_SOFTWARE); } break; - case FTW_DP: + case FTW_D: { struct stat st; if (stat(fpath, &st) == -1) @@ -112,6 +112,17 @@ namespace Log::error("Error: stat(\"" + std::string(fpath) + "\") failed."); return 1; } + if (!strcmp(relativeOldPath, "program/wizards") || + !strcmp(relativeOldPath, "sdk") || + !strcmp(relativeOldPath, "share/gallery") || + !strcmp(relativeOldPath, "share/Scripts") || + !strcmp(relativeOldPath, "share/template") || + !strcmp(relativeOldPath, "share/config/wizard") || + !strcmp(relativeOldPath, "share/config/wizard")) + { + Log::debug("skip redundant paths " + std::string(relativeOldPath)); + return FTW_SKIP_SUBTREE; + } File(newPath).createDirectories(); struct utimbuf ut; ut.actime = st.st_atime; @@ -133,7 +144,9 @@ namespace Log::error("nftw: symlink to nonexistent file: '" + std::string(fpath) + "', ignored."); break; default: + Log::error("nftw: unexpected type: '" + std::to_string(typeflag)); assert(false); + break; } return 0; } @@ -144,7 +157,7 @@ namespace if (sourceForLinkOrCopy->back() == '/') sourceForLinkOrCopy->pop_back(); *destinationForLinkOrCopy = destination; - if (nftw(source.c_str(), linkOrCopyFunction, 10, FTW_DEPTH) == -1) + if (nftw(source.c_str(), linkOrCopyFunction, 10, FTW_ACTIONRETVAL) == -1) Log::error("linkOrCopy: nftw() failed for '" + source + "'"); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits