Skip to content

Commit 569bb1f

Browse files
committed
Fix error on Mono
1 parent 93425d5 commit 569bb1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Src/IronPython.Modules/mmap.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ public void resize(long newsize) {
846846

847847
if (newsize == 0) {
848848
// resizing to an empty mapped region is not allowed
849-
throw WindowsError(_offset != 0
849+
throw WindowsError(_offset != 0 && RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
850850
? PythonExceptions._OSError.ERROR_ACCESS_DENIED
851851
: PythonExceptions._OSError.ERROR_FILE_INVALID
852852
);

0 commit comments

Comments
 (0)