Set error condition when chunksize for a non mmaped file is queried
This commit is contained in:
parent
4821e7eb3f
commit
c1c97228a5
1 changed files with 6 additions and 0 deletions
|
|
@ -136,6 +136,12 @@ lumiera_file_chunksize_set (LumieraFile self, size_t chunksize)
|
|||
size_t
|
||||
lumiera_file_chunksize_get (LumieraFile self)
|
||||
{
|
||||
if (!self->descriptor->mmapings)
|
||||
{
|
||||
LUMIERA_ERROR_SET (file, FILE_NOCHUNKSIZE, lumiera_filedescriptor_name (self->descriptor));
|
||||
return 0;
|
||||
}
|
||||
|
||||
return self->descriptor->mmapings->chunksize;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue