fix(actions): cross platform watch dir file handling (#458)

* chore: update deps

* fix(actions): cross-platform file handling

* fix(qbittorrent): unrelated failing test
This commit is contained in:
ze0s 2022-09-10 20:31:46 +02:00 committed by GitHub
parent 8b96f29f37
commit bbb8d2fe6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 129 additions and 123 deletions

View file

@ -3,7 +3,7 @@ package action
import (
"context"
"encoding/base64"
"io/ioutil"
"os"
"time"
"github.com/autobrr/autobrr/internal/domain"
@ -123,7 +123,7 @@ func (s *service) delugeV1(client *domain.DownloadClient, action domain.Action,
}
}
t, err := ioutil.ReadFile(release.TorrentTmpFile)
t, err := os.ReadFile(release.TorrentTmpFile)
if err != nil {
return nil, errors.Wrap(err, "could not read torrent file: %v", release.TorrentTmpFile)
}
@ -212,7 +212,7 @@ func (s *service) delugeV2(client *domain.DownloadClient, action domain.Action,
}
}
t, err := ioutil.ReadFile(release.TorrentTmpFile)
t, err := os.ReadFile(release.TorrentTmpFile)
if err != nil {
return nil, errors.Wrap(err, "could not read torrent file: %v", release.TorrentTmpFile)
}