summaryrefslogtreecommitdiff
path: root/finder
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2020-07-06 17:13:43 -0700
committer Colin Cross <ccross@android.com> 2020-07-06 17:15:05 -0700
commit96e5e41b88a30afc4710a9add6ea27bec6ff38bd (patch)
treee8858f7b12e705f22bda8bb35a7d55406742ee4e /finder
parent0eeff82c98b8cfcac50a81c7f736adac7246ee78 (diff)
Dist module_paths/files.db
Help debugging finder issues by disting module_paths/files.db for later analysis. Bug: 157656545 Test: treehugger Change-Id: Idfa4cffe7ef724b399a2667efd487f9c3c76bb6b
Diffstat (limited to 'finder')
-rw-r--r--finder/finder.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/finder/finder.go b/finder/finder.go
index f20bed29e..6513fa301 100644
--- a/finder/finder.go
+++ b/finder/finder.go
@@ -325,7 +325,12 @@ func (f *Finder) FindMatching(rootPath string, filter WalkFunc) []string {
// Shutdown declares that the finder is no longer needed and waits for its cleanup to complete
// Currently, that only entails waiting for the database dump to complete.
func (f *Finder) Shutdown() {
- f.waitForDbDump()
+ f.WaitForDbDump()
+}
+
+// WaitForDbDump returns once the database has been written to f.DbPath.
+func (f *Finder) WaitForDbDump() {
+ f.shutdownWaitgroup.Wait()
}
// End of public api
@@ -345,10 +350,6 @@ func (f *Finder) goDumpDb() {
}
}
-func (f *Finder) waitForDbDump() {
- f.shutdownWaitgroup.Wait()
-}
-
// joinCleanPaths is like filepath.Join but is faster because
// joinCleanPaths doesn't have to support paths ending in "/" or containing ".."
func joinCleanPaths(base string, leaf string) string {