mozilla / makedrive

[RETIRED] Webmaker Filesystem
Mozilla Public License 2.0
351 stars 33 forks source link

Develop a solution for allowing persistence of information about the file system between sessions #450

Open gideonthomas opened 9 years ago

gideonthomas commented 9 years ago

In #443, we found that on the client, fs.pathToSync was being reset when you close a tab (running makedrive) before a sync can happen, and open the tab again. This is because a new fs instance is being handed to you everytime we do that.

This is one of several other possible examples of information or "makedrive metadata" that we need to persist between different sessions (e.g. closing and opening a tab).

One way of doing this is by creating an /etc directory (only accessible to makedrive and not the user) in the fs itself to hold such data. However, this might not necessarily be the best solution. We need to discuss how to handle this.

alicoding commented 9 years ago

Lets store an xattr on the sync root i.e. / root directory and it will have pathToSync from the previous session and we would know that we need to sync.