aboutsummaryrefslogtreecommitdiff
path: root/weed/util
diff options
context:
space:
mode:
Diffstat (limited to 'weed/util')
-rw-r--r--weed/util/constants.go2
-rw-r--r--weed/util/file_util.go4
-rw-r--r--weed/util/fla9/fla9.go4
3 files changed, 7 insertions, 3 deletions
diff --git a/weed/util/constants.go b/weed/util/constants.go
index 1900d3d42..55f5b52d6 100644
--- a/weed/util/constants.go
+++ b/weed/util/constants.go
@@ -5,7 +5,7 @@ import (
)
var (
- VERSION = fmt.Sprintf("%s %d.%02d", sizeLimit, 2, 26)
+ VERSION = fmt.Sprintf("%s %d.%02d", sizeLimit, 2, 28)
COMMIT = ""
)
diff --git a/weed/util/file_util.go b/weed/util/file_util.go
index 70135180d..f83f80265 100644
--- a/weed/util/file_util.go
+++ b/weed/util/file_util.go
@@ -69,6 +69,10 @@ func CheckFile(filename string) (exists, canRead, canWrite bool, modTime time.Ti
func ResolvePath(path string) string {
+ if !strings.Contains(path, "~") {
+ return path
+ }
+
usr, _ := user.Current()
dir := usr.HomeDir
diff --git a/weed/util/fla9/fla9.go b/weed/util/fla9/fla9.go
index 335b9ff7a..91d3b5ce9 100644
--- a/weed/util/fla9/fla9.go
+++ b/weed/util/fla9/fla9.go
@@ -886,7 +886,7 @@ func (f *FlagSet) parseOne() (bool, error) {
// The return value will be ErrHelp if -help or -h were set but not defined.
func (f *FlagSet) Parse(arguments []string) error {
if _, ok := f.formal[DefaultConfigFlagName]; !ok {
- f.String(DefaultConfigFlagName, "", "config file")
+ f.String(DefaultConfigFlagName, "", "file with command line options with each line in optionName=optionValue format")
}
f.parsed = true
@@ -1078,7 +1078,7 @@ func NewFlagSetWithEnvPrefix(name string, prefix string, errorHandling ErrorHand
// DefaultConfigFlagName defines the flag name of the optional config file
// path. Used to lookup and parse the config file when a default is set and
// available on disk.
-var DefaultConfigFlagName = "config"
+var DefaultConfigFlagName = "options"
// ParseFile parses flags from the file in path.
// Same format as commandline arguments, newlines and lines beginning with a