Skip to content

Commit cf41610

Browse files
committed
Remvoed tmp dir
1 parent 334707d commit cf41610

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pkg/backend/blob.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,9 @@ func NewBlobBackend(ctx context.Context, u string, opts ...Opt) (Backend, error)
103103
bucket, err = s3blob.OpenBucket(ctx, client, self.url.Host, nil)
104104
} else if self.url.Scheme == "file" {
105105
// For file:// the path is the bucket root dir - open using just the path.
106-
// Set no_tmp_dir=1 so temp files are created next to their destination,
107-
// avoiding "invalid cross-device link" errors when os.TempDir() is on a
108-
// different mount (e.g. /tmp vs /data in Docker).
109-
openURL := &url.URL{Scheme: "file", Path: self.url.Path, RawQuery: "no_tmp_dir=1"}
106+
// Temp files are written to os.TempDir() (TMPDIR env var), which should be
107+
// on the same filesystem as the data dir to avoid cross-device link errors.
108+
openURL := &url.URL{Scheme: "file", Path: self.url.Path}
110109
bucket, err = blob.OpenBucket(ctx, openURL.String())
111110
} else {
112111
// For s3, mem, etc.: open at root (strip path) to avoid PrefixedBucket

0 commit comments

Comments
 (0)