Menu

#60 ftfileprovider should always open files in read-only mode

open
nobody
None
5
2012-12-15
2012-05-19
No

Here is my problem: I am sandboxing RetroShare (using Sandboxie). I have observed that files, which are downloaded by my friends, are always duplicated in the Sandbox. This can only happen if RetroShare opens these files in write-mode.

I have searched for the code, which is responsible for this behavior, and I have found it in ftfilecreator.cc. As it seems, RetroShare always tries to open the served files in read/write-mode first. The read-only mode servers as a fallback.

I have prepared a patch which changes the behavior such that the files are always opened in read-only mode.

Discussion

  • Robert Nitsch

    Robert Nitsch - 2012-05-19

    changes the behavior such that the files are always opened in read-only mode

     
  • CsoL

    CsoL - 2012-12-15

    Problem is: ftFileProvider shared the file descriptor with its subclass ftFileCreator. So sometimes it needs to open it in R/W because the file is being written by ftFileCreator while being swarmed by ftFileProvider.

    Why is this an issue btw?