jstaf / onedriver

A native Linux filesystem for Microsoft OneDrive
GNU General Public License v3.0
1.86k stars 91 forks source link

Fix pulling remote file with local filesystem cache #351

Closed ruuzia closed 8 months ago

ruuzia commented 10 months ago

With the latest local file based caching system, accessing a cached file that has been changed remotely does not work properly. The new content is actually being tacked on to the end of the cache file descriptor, resulting in invalid data. This pull request resets and properly updates the file's local cache when it is accessed with remote changes.

ruuzia commented 10 months ago

Relevant issue: #350

jstaf commented 8 months ago

Hey, just wanted to say thank you for the PR - I ended up taking this change and changing a few things in https://github.com/jstaf/onedriver/pull/359 to make 0.14.1. While looking through things, I discovered an additional problem where file hashing was wrong as well for downloaded files where the seek position wasn't 0. Just wanted to say thanks again for this contribution (I would have merged this but it got duplicated by the 0.14.1 changes I made)!