mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Ensure support for wide-char filenames on Windows #4391
This commit is contained in:
@@ -1359,7 +1359,8 @@ class PipelineWorker : public Napi::AsyncWorker {
|
||||
// Add file size to info
|
||||
if (baton->formatOut != "dz" || sharp::IsDzZip(baton->fileOut)) {
|
||||
try {
|
||||
uint32_t const size = static_cast<uint32_t>(std::filesystem::file_size(baton->fileOut));
|
||||
uint32_t const size = static_cast<uint32_t>(
|
||||
std::filesystem::file_size(std::filesystem::u8path(baton->fileOut)));
|
||||
info.Set("size", size);
|
||||
} catch (...) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user