refactor: replace OpenFile with Open

This commit is contained in:
lilong.129
2025-05-07 16:40:39 +08:00
parent 5e9fca046a
commit 81f29cdef5
7 changed files with 8 additions and 8 deletions

View File

@@ -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))
}