Skip to content

Commit

Permalink
fix path bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wwek committed Nov 4, 2018
1 parent 06d5b59 commit 0c05d0d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/txt2Htxt.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ import (
"encoding/hex"
"fmt"
"os"
"path/filepath"
"strings"
)

func Txt2Htxt(htype string, hfiles []string) {
for _, v := range hfiles {
sfileStr := v
tfileStr := htype + "_" + v
sext := filepath.Ext(v)
spath,sfname := filepath.Split(v)
sfname = strings.TrimSuffix(sfname,sext)
tfileStr := spath + sfname + "_" + htype + sext
sfile, err := os.OpenFile(sfileStr,os.O_RDONLY, 0600)
if err != nil {
fmt.Println(err)
Expand Down

0 comments on commit 0c05d0d

Please sign in to comment.