Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: client/archiver/directory.go

Issue 2981223003: Reuse blacklisting code in exp_archive. (Closed)
Patch Set: address review comments Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | client/cmd/isolate/exp_archive.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/archiver/directory.go
diff --git a/client/archiver/directory.go b/client/archiver/directory.go
index ecb38d06d66afea03458da29c0f791d158b7b487..26e78882236b7fa1637c154942fa87aa9c4044d7 100644
--- a/client/archiver/directory.go
+++ b/client/archiver/directory.go
@@ -74,7 +74,7 @@ func walk(root string, fsView common.FilesystemView, c chan<- *walkItem) {
}
if relPath == "" { // empty string indicates skip.
- return returnSkip(info)
+ return common.WalkFuncSkipFile(info)
}
if !info.IsDir() {
@@ -90,15 +90,6 @@ func walk(root string, fsView common.FilesystemView, c chan<- *walkItem) {
}
-// returnSkip returns the return value expected from a filepath.WalkFunc in the case where no more processing of file should occur.
-func returnSkip(file os.FileInfo) error {
- if file.IsDir() {
- // Must not return io.SkipDir for file, filepath.walk() handles this badly.
- return filepath.SkipDir
- }
- return nil
-}
-
// PushDirectory walks a directory at root and creates a .isolated file.
//
// It walks the directories synchronously, then returns a *Item to signal when
« no previous file with comments | « no previous file | client/cmd/isolate/exp_archive.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698