[Libreoffice-commits] online.git: loolwsd/LOOLKit.cpp
Michael Meeks
michael.meeks at collabora.com
Mon Apr 4 04:01:23 UTC 2016
loolwsd/LOOLKit.cpp | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
New commits:
commit 23672ac3626ff2d0691506ac60a81883ca37f738
Author: Michael Meeks <michael.meeks at 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 <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at 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 + "'");
}
}
More information about the Libreoffice-commits
mailing list