We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c737e1 commit 3b89ed9Copy full SHA for 3b89ed9
src/os/win32/dev-file.c
@@ -376,9 +376,14 @@ static BOOL Seek_File_64(REBREQ *file)
376
return DR_ERROR;
377
}
378
379
- if (info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) SET_FLAG(file->modes, RFM_DIR);
380
- else CLR_FLAG(file->modes, RFM_DIR);
381
- file->file.size = ((i64)info.nFileSizeHigh << 32) + (i64)info.nFileSizeLow;
+ if (info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+ SET_FLAG(file->modes, RFM_DIR);
+ file->file.size = 0;
382
+ }
383
+ else {
384
+ CLR_FLAG(file->modes, RFM_DIR);
385
+ file->file.size = ((i64)info.nFileSizeHigh << 32) + (i64)info.nFileSizeLow;
386
387
file->file.time.l = info.ftLastWriteTime.dwLowDateTime;
388
file->file.time.h = info.ftLastWriteTime.dwHighDateTime;
389
return DR_DONE;
0 commit comments