1.1 --- a/libfsserver/lib/files/file_provider.cc Sat May 11 01:47:53 2024 +0200
1.2 +++ b/libfsserver/lib/files/file_provider.cc Sat May 11 19:17:09 2024 +0200
1.3 @@ -1,7 +1,7 @@
1.4 /*
1.5 * An object providing access to file functionality.
1.6 *
1.7 - * Copyright (C) 2021, 2022 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2021, 2022, 2024 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or
1.11 * modify it under the terms of the GNU General Public License as
1.12 @@ -63,16 +63,16 @@
1.13 object_flags_t *object_flags,
1.14 Resource **resource)
1.15 {
1.16 + *object_flags = OBJECT_SUPPORTS_MMAP | OBJECT_HAS_SIZE;
1.17 +
1.18 /* Initialise the pager with the provider and a reference to this object for
1.19 detaching from the provider. */
1.20
1.21 - FilePager *pager = new FilePager(_fileid, this, flags);
1.22 + FilePager *pager = new FilePager(_fileid, this, flags, *object_flags);
1.23
1.24 - /* Obtain the size details from the pager, also providing appropriate
1.25 - flags. */
1.26 + /* Obtain the size details from the pager. */
1.27
1.28 *size = pager->get_data_size();
1.29 - *object_flags = OBJECT_SUPPORTS_MMAP | OBJECT_HAS_SIZE;
1.30
1.31 this->attach();
1.32 *resource = pager;