Skip to content

Commit

Permalink
Add error handling when finding out the modification/creation times (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
foobarnick authored Mar 5, 2021
1 parent 3f334ea commit 4635e1f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/tasks/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ func scanLocalVolume(vol models.Volume, db *gorm.DB, tlog *logrus.Entry) {

for j, path := range videoProcList {
fStat, _ := os.Stat(path)
fTimes, _ := times.Stat(path)
fTimes, err := times.Stat(path)
if err != nil {
tlog.Errorf("Can't get the modification/creation times for %s, error: %s", path, err)
}

var birthtime time.Time
if fTimes.HasBirthTime() {
Expand Down

0 comments on commit 4635e1f

Please sign in to comment.