mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-01-05 16:27:26 -08:00
fix(path): correct path for env.DirIsWritable
This commit is contained in:
parent
9a98823166
commit
2cb5f24708
|
@ -125,7 +125,7 @@ func (env *ShellEnvironment) LookWinAppPath(file string) (string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (env *ShellEnvironment) DirIsWritable(path string) bool {
|
func (env *ShellEnvironment) DirIsWritable(path string) bool {
|
||||||
defer env.Trace(time.Now(), "DirIsWritable")
|
defer env.Trace(time.Now(), "DirIsWritable", path)
|
||||||
info, err := os.Stat(path)
|
info, err := os.Stat(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
env.Log(Error, "DirIsWritable", err.Error())
|
env.Log(Error, "DirIsWritable", err.Error())
|
||||||
|
|
|
@ -84,7 +84,7 @@ func (pt *Path) Enabled() bool {
|
||||||
pt.Location = pt.pwd
|
pt.Location = pt.pwd
|
||||||
}
|
}
|
||||||
pt.StackCount = pt.env.StackCount()
|
pt.StackCount = pt.env.StackCount()
|
||||||
pt.Writable = pt.env.DirIsWritable(pt.pwd)
|
pt.Writable = pt.env.DirIsWritable(pt.env.Pwd())
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue