mirror of
https://github.com/ManyakRus/starter.git
synced 2025-11-26 23:10:42 +02:00
ProgramDir()
This commit is contained in:
@@ -218,6 +218,23 @@ func ProgramDir_Common() string {
|
||||
}
|
||||
}
|
||||
|
||||
substr = "\\temp\\"
|
||||
pos1 = strings.Index(sdir, substr)
|
||||
if pos1 >= 0 {
|
||||
filename = CurrentFilename()
|
||||
dir = filepath.Dir(filename)
|
||||
|
||||
substr := SeparatorFile() + "vendor" + SeparatorFile()
|
||||
pos_vendor := strings.Index(strings.ToLower(dir), substr)
|
||||
if pos_vendor >= 0 {
|
||||
dir = dir[0:pos_vendor]
|
||||
} else if dir[len(dir)-5:] == "micro" {
|
||||
dir = FindDirUp(dir)
|
||||
//dir = FindDirUp(dir)
|
||||
//dir = FindDirUp(dir)
|
||||
}
|
||||
}
|
||||
|
||||
//dir, err := os.Getwd()
|
||||
//if err != nil {
|
||||
// log.Fatalln(err)
|
||||
|
||||
Reference in New Issue
Block a user