Fix typos and bugs
parent
1f8e0f3376
commit
f61c324496
|
@ -18,7 +18,7 @@ install:
|
||||||
- go get github.com/tsenart/deadcode
|
- go get github.com/tsenart/deadcode
|
||||||
|
|
||||||
script:
|
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
|
- go test ./... -timeout 30s -tags
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
|
|
|
@ -41,7 +41,7 @@ func init() {
|
||||||
flag.StringVar(&config, "config", "", "JSON configuration file")
|
flag.StringVar(&config, "config", "", "JSON configuration file")
|
||||||
flag.StringVar(&port, "port", "80", "HTTP Port")
|
flag.StringVar(&port, "port", "80", "HTTP Port")
|
||||||
flag.StringVar(&database, "database", "./filemanager.db", "Database path")
|
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.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(&allowCommands, "allow-commands", true, "Default allow commands option")
|
||||||
flag.BoolVar(&allowEdit, "allow-edit", true, "Default allow edit option")
|
flag.BoolVar(&allowEdit, "allow-edit", true, "Default allow edit option")
|
||||||
|
|
3
file.go
3
file.go
|
@ -467,6 +467,9 @@ func copyFile(source string, dest string) (err error) {
|
||||||
sourceinfo, err := os.Stat(source)
|
sourceinfo, err := os.Stat(source)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = os.Chmod(dest, sourceinfo.Mode())
|
err = os.Chmod(dest, sourceinfo.Mode())
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue