Skip to content

Commit

Permalink
feat: Fixes invalid cross-device link for dashboard when /tmp lies on…
Browse files Browse the repository at this point in the history
… another partition (#195)

Co-authored-by: Madhur <[email protected]>
  • Loading branch information
madhur and madhurgames authored Sep 22, 2023
1 parent 1bc3e52 commit f86387c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions internal/service/storage_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package service
import (
"context"
"errors"
"os"
"path/filepath"

log "github.com/sirupsen/logrus"
"gocloud.dev/blob"
"gocloud.dev/blob/fileblob"
_ "gocloud.dev/blob/fileblob"
"os"
"path/filepath"
)

// LocalStorage default storage engine
Expand All @@ -34,7 +35,10 @@ func (s *LocalStorage) getBucket(baseFolder string) (*blob.Bucket, error) {
if _, err := os.Stat(baseFolder); err != nil {
_ = os.Mkdir(baseFolder, 0750)
}
return fileblob.OpenBucket(baseFolder, nil)
opts := fileblob.Options {
NoTempDir: true,
}
return fileblob.OpenBucket(baseFolder, &opts)
}

// WriteFile writes file to disk and returns an error if operation failed
Expand Down

0 comments on commit f86387c

Please sign in to comment.