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

@@ -699,7 +699,7 @@ func (ad *ADBDriver) StopCaptureLog() (result interface{}, err error) {
return pointRes, nil
}
reader, err := os.OpenFile(files[0], os.O_RDONLY, 0o600)
reader, err := os.Open(files[0])
if err != nil {
log.Info().Msg("open File error")
return pointRes, nil

View File

@@ -978,7 +978,7 @@ func (wd *WDADriver) StartCaptureLog(identifier ...string) error {
func (wd *WDADriver) PushImage(localPath string) error {
log.Info().Str("localPath", localPath).Msg("WDADriver.PushImage")
localFile, err := os.OpenFile(localPath, os.O_RDONLY, 0o600)
localFile, err := os.Open(localPath)
if err != nil {
return err
}