Merge pull request #21 from playHing/normal-flow
Fix the path to get zero-epwing
This commit is contained in:
commit
fc189b9b83
@ -78,14 +78,17 @@ func epwingExportDb(inputPath, outputPath, language, title string, stride int, p
|
||||
|
||||
var data []byte
|
||||
if toolExec {
|
||||
exePath, err := os.Executable()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
toolPath := filepath.Join("bin", runtime.GOOS, "zero-epwing")
|
||||
if runtime.GOOS == "windows" {
|
||||
toolPath += ".exe"
|
||||
}
|
||||
|
||||
if toolPath, err = filepath.Abs(toolPath); err != nil {
|
||||
return err
|
||||
}
|
||||
toolPath = filepath.Join(filepath.Dir(exePath), toolPath)
|
||||
|
||||
if _, err = os.Stat(toolPath); err != nil {
|
||||
return fmt.Errorf("failed to find zero-epwing in '%s'", toolPath)
|
||||
|
Loading…
Reference in New Issue
Block a user