From 40f3d86c1187877022b1b09020115d26d0cecf6e Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Tue, 25 Jul 2017 12:25:15 +0100 Subject: [PATCH] Fix typos and bugs Former-commit-id: fb374cfe0d91354506341fc5463dde7165bddc57 [formerly c1fbd8be9b1cdb8b72018e24d1bd70491675bc69] [formerly c45c4d8d6c5e1dbb9fabc839db8a1293ead7efe8 [formerly f61c32449623563773e4dfe853fc563dbff46ab0]] Former-commit-id: bb005c63e6f2ef6c33c991071547f4a66b18e891 [formerly be35360661a5d2271e46e723075132906fa0562e] Former-commit-id: 3072b5e854ca3b2d125c480262e79c66a356c08e --- .travis.yml | 2 +- cmd/filemanager/main.go | 2 +- file.go | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e1cad13b..433119f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ install: - go get github.com/tsenart/deadcode script: - - gometalinter --disable-all -E vet -E gofmt -E misspell -E ineffassign -E goimports -E deadcode --tests ./... + - gometalinter --disable-all -E vet -E gofmt -E misspell -E ineffassign -E goimports -E deadcode --exclude="rice-box.go" --tests ./... - go test ./... -timeout 30s -tags after_script: diff --git a/cmd/filemanager/main.go b/cmd/filemanager/main.go index b6908c5d..dced2c8c 100644 --- a/cmd/filemanager/main.go +++ b/cmd/filemanager/main.go @@ -41,7 +41,7 @@ func init() { flag.StringVar(&config, "config", "", "JSON configuration file") flag.StringVar(&port, "port", "80", "HTTP Port") flag.StringVar(&database, "database", "./filemanager.db", "Database path") - flag.StringVar(&scope, "scope", ".", "Defualt scope for new users") + flag.StringVar(&scope, "scope", ".", "Default scope for new users") flag.StringVar(&commands, "commands", "git svn hg", "Space separated commands available for new users") flag.BoolVar(&allowCommands, "allow-commands", true, "Default allow commands option") flag.BoolVar(&allowEdit, "allow-edit", true, "Default allow edit option") diff --git a/file.go b/file.go index 0bce1818..5cd799f0 100644 --- a/file.go +++ b/file.go @@ -467,6 +467,9 @@ func copyFile(source string, dest string) (err error) { sourceinfo, err := os.Stat(source) if err != nil { err = os.Chmod(dest, sourceinfo.Mode()) + if err != nil { + return err + } } }