Просмотр исходного кода

use absolute file path to prevent errors after chdir.

Lucas Stadler лет назад: 11
Родитель
Сommit
71378a4ce5
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      go/qst.go

+ 2 - 0
go/qst.go

8
	"os"
8
	"os"
9
	"os/exec"
9
	"os/exec"
10
	"os/signal"
10
	"os/signal"
11
	"path/filepath"
11
	"strings"
12
	"strings"
12
	"syscall"
13
	"syscall"
13
	"time"
14
	"time"
69
		}
70
		}
70
		cmd = projectCmd
71
		cmd = projectCmd
71
	}
72
	}
73
	file, _ = filepath.Abs(file)
72
	cmd = strings.Replace(cmd, "{file}", file, -1)
74
	cmd = strings.Replace(cmd, "{file}", file, -1)
73
	if err := os.Chdir(fileutil.Dir(file)); err != nil {
75
	if err := os.Chdir(fileutil.Dir(file)); err != nil {
74
		log.Fatal(err)
76
		log.Fatal(err)