1
0
Fork 0
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:
postmannen 2022-02-22 09:41:59 +01:00
parent 38462d7310
commit c863c12608

View file

@ -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)
}