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

Unified Diff: client/cmd/isolate/batch_archive.go

Issue 2941963002: Remove batcharchive dependency on common.IsDirectory (Closed)
Patch Set: Remove unused import Created 3 years, 6 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/internal/common/utils.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/cmd/isolate/batch_archive.go
diff --git a/client/cmd/isolate/batch_archive.go b/client/cmd/isolate/batch_archive.go
index 772c7a96a056fab64fbd03b8b74757ab023695ce..0cca530f1cdb1bf42fecad841070a7c38d0bd878 100644
--- a/client/cmd/isolate/batch_archive.go
+++ b/client/cmd/isolate/batch_archive.go
@@ -18,7 +18,6 @@ import (
"github.com/maruel/subcommands"
"github.com/luci/luci-go/client/archiver"
- "github.com/luci/luci-go/client/internal/common"
"github.com/luci/luci-go/client/isolate"
"github.com/luci/luci-go/common/auth"
"github.com/luci/luci-go/common/data/text/units"
@@ -216,9 +215,11 @@ func processGenJSONData(r io.Reader) (*isolate.ArchiveOptions, error) {
if data.Version != isolate.IsolatedGenJSONVersion {
return nil, fmt.Errorf("invalid version %d", data.Version)
}
- if !common.IsDirectory(data.Dir) {
+
+ if fileInfo, err := os.Stat(data.Dir); err != nil || !fileInfo.IsDir() {
return nil, fmt.Errorf("invalid dir %s", data.Dir)
}
+
opts, err := parseArchiveCMD(data.Args, data.Dir)
if err != nil {
return nil, fmt.Errorf("invalid archive command: %s", err)
« no previous file with comments | « no previous file | client/internal/common/utils.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698