From ec1f9ecb2666f89cd17a9066701c4c692dfbc244 Mon Sep 17 00:00:00 2001 From: ashiqursuperfly Date: Mon, 30 Dec 2024 19:31:09 +0600 Subject: [PATCH] ensure fileblob does not create temp files in OS's temp directory (respects 'export-path' config instead) https://github.com/google/go-cloud/issues/3294 --- prune/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prune/service.go b/prune/service.go index 9bbd35d..f38d965 100644 --- a/prune/service.go +++ b/prune/service.go @@ -46,7 +46,7 @@ var ( dirPath := fmt.Sprintf("file://%s/%s", pruneConfig.GetExportPath(), pruneConfig.GetRemoteFilePrefix()) objectName := fmt.Sprintf("local_%s_%s.jsonl", pruneConfig.GetExportNodeName(), now) log.Info().Msgf("Local archive path: %s, object name: %s", dirPath, objectName) - fileBucket, err := blob.OpenBucket(context.Background(), dirPath) + fileBucket, err := blob.OpenBucket(context.Background(), dirPath+"?no_tmp_dir=1") if err != nil { return nil, fmt.Errorf("failed to open local archive file: %w", err) }