fix: mp4decrypt解密时的中文字符路径错误
This commit is contained in:
parent
6320712444
commit
c93525993a
@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"file/filepath"
|
||||||
"github.com/gospider007/requests"
|
"github.com/gospider007/requests"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
|
|
||||||
@ -377,7 +377,8 @@ func ExtMvData(keyAndUrls string, savePath string) error {
|
|||||||
tempFile.Close()
|
tempFile.Close()
|
||||||
fmt.Println("\nDownloaded.")
|
fmt.Println("\nDownloaded.")
|
||||||
|
|
||||||
cmd1 := exec.Command("mp4decrypt", "--key", key, tempFile.Name(), savePath)
|
cmd1 := exec.Command("mp4decrypt", "--key", key, tempFile.Name(), filepath.Base(savePath))
|
||||||
|
cmd1.Dir = filepath.Dir(savePath) //设置mp4decrypt的工作目录以解决中文路径错误
|
||||||
outlog, err := cmd1.CombinedOutput()
|
outlog, err := cmd1.CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Decrypt failed: %v\n", err)
|
fmt.Printf("Decrypt failed: %v\n", err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user