mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-26 10:50:12 +08:00
refactor: replace OpenFile with Open
This commit is contained in:
@@ -536,7 +536,7 @@ func (d *Device) List(remotePath string) (devFileInfos []DeviceFileInfo, err err
|
||||
}
|
||||
|
||||
func (d *Device) PushFile(localPath, remotePath string, modification ...time.Time) (err error) {
|
||||
localFile, err := os.OpenFile(localPath, os.O_RDONLY, 0o600)
|
||||
localFile, err := os.Open(localPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -645,7 +645,7 @@ func (d *Device) installViaABBExec(apk io.ReadSeeker, args ...string) (raw []byt
|
||||
}
|
||||
|
||||
func (d *Device) InstallAPK(apkPath string, args ...string) (string, error) {
|
||||
apkFile, err := os.OpenFile(apkPath, os.O_RDONLY, 0o600)
|
||||
apkFile, err := os.Open(apkPath)
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, fmt.Sprintf("open apk file %s failed", apkPath))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user