Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions tensorflow_io/core/filesystems/s3/s3_filesystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,18 @@ typedef struct S3File {
s3_client(s3_client),
transfer_manager(transfer_manager),
outfile(Aws::MakeShared<Aws::Utils::TempFile>(
kS3FileSystemAllocationTag, nullptr, "_s3_filesystem_XXXXXX",
kS3FileSystemAllocationTag,
#if defined(_MSC_VER)
// On Windows, `Aws::FileSystem::CreateTempFilePath()` return
// `C:\Users\username\AppData\Local\Temp\`. Adding template will
// cause an error.
nullptr,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yongtang where will be the temporary files be created if it is a nullptr?

#else
"/tmp/_s3_filesystem_XXXXXX",
#endif
std::ios_base::binary | std::ios_base::trunc | std::ios_base::in |
std::ios_base::out)) {}
std::ios_base::out)) {
}
} S3File;

void Cleanup(TF_WritableFile* file) {
Expand Down