Skip to content

Commit 585e78d

Browse files
committed
Merge pull request #190 from Tonkpils/bug
Compare home path expansion using OS specific separator
2 parents 65a4e1f + c44de16 commit 585e78d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ func (c *Config) SetDir(path string) error {
264264
}
265265

266266
func expandHome(path, home string) string {
267-
if path[:2] == "~/" {
267+
if path[:2] == "~"+string(os.PathSeparator) {
268268
return strings.Replace(path, "~", home, 1)
269269
}
270270
return path

0 commit comments

Comments
 (0)