mirror of
https://github.com/postmannen/ctrl.git
synced 2024-12-14 12:37:31 +00:00
fixed wrong path for startup folder
This commit is contained in:
parent
38462d7310
commit
c863c12608
1 changed files with 3 additions and 1 deletions
|
@ -91,7 +91,9 @@ func (s *server) readStartupFolder() {
|
|||
// getFilePaths will get the names of all the messages in
|
||||
// the folder specified from current working directory.
|
||||
func (s *server) getFilePaths(dirName string) ([]string, error) {
|
||||
dirPath, err := os.Getwd()
|
||||
dirPath, err := os.Executable()
|
||||
dirPath = filepath.Dir(dirPath)
|
||||
fmt.Printf(" * DEBUG: %v\n", dirPath)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error: startup folder: unable to get the working directory %v: %v", dirPath, err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue