mirror of
https://github.com/postmannen/ctrl.git
synced 2025-03-15 10:57:42 +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
|
// getFilePaths will get the names of all the messages in
|
||||||
// the folder specified from current working directory.
|
// the folder specified from current working directory.
|
||||||
func (s *server) getFilePaths(dirName string) ([]string, error) {
|
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 {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error: startup folder: unable to get the working directory %v: %v", dirPath, err)
|
return nil, fmt.Errorf("error: startup folder: unable to get the working directory %v: %v", dirPath, err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue