Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
problem (and patch) on read only .aar files #19
i installed some .aar files in /var/spool/aarddict/ with owner nobody and world readable.
aarddict would not read them and give a "permission denied" error.
the problem is in the init function in the Volume class, file dictionary.py, line 416 ( on my version ):
the 'r+b' opens the file in "update mode", which means read and write.
after a change to
Indeed, 'r+b' mode prevents opening dictionaries from any read-only file system - bad. I remember having trouble with 'rb' - mmap.mmap() for some reason didn't like the file opened in 'rb' mode and was failing on one of the platforms (Windows?) and open(self.file_name, 'r+b') worked everywhere, so that's how it went... Anyway, 'rb' is the correct mode to use, I'll do more testing on different platforms and put it in. Thank you.