Skip to content

Commit

Permalink
fix download extension
Browse files Browse the repository at this point in the history
  • Loading branch information
acquamarin committed Oct 14, 2024
1 parent d7157a5 commit bcf2573
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/processor/operator/simple/install_extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ void InstallExtension::saveExtensionToLocalFile(const std::string& extensionData
if (!vfs->fileOrPathExists(extensionDir, context)) {
vfs->createDir(extensionDir);
}
auto fileInfo = vfs->openFile(extensionPath, O_WRONLY | O_CREAT);
auto fileInfo =
vfs->openFile(extensionPath, common::FileFlags::WRITE | common::FileFlags::READ_ONLY |
common::FileFlags::CREATE_AND_TRUNCATE_IF_EXISTS);
fileInfo->writeFile(reinterpret_cast<const uint8_t*>(extensionData.c_str()),
extensionData.size(), 0 /* offset */);
fileInfo->syncFile();
Expand Down

0 comments on commit bcf2573

Please sign in to comment.