Skip to content
Snippets Groups Projects
Commit e6bc20a4 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

avoid write permission requirement in FSStructureServer

parent ce53cc57
Branches
Tags
No related merge requests found
......@@ -168,8 +168,9 @@ class FSStructureServer:
tmp.sort()
sorted_data_files = [x[1] for x in tmp]
for f in sorted_data_files:
self._data_fh.append(open(f, 'r+b'))
self._data.append(mmap.mmap(self._data_fh[-1].fileno(), 0))
self._data_fh.append(open(f, 'rb'))
self._data.append(mmap.mmap(self._data_fh[-1].fileno(), 0,
prot=mmap.PROT_READ))
return self._data
@property
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment