Comments (3)
DriveSync only syncs files that are owned by the user, yes. The reason for this is that I figured that most users only want files on their local system that actually fully "belong" to them. Also, shared files can get a bit messy on Drive, especially files that were shared a long time ago (for example, it turned out that on my Drive there were some files that were shared with me years ago, that only show up in the API call, but nowhere on the web client and that I couldn't remove from my Drive).
However, changing this should be trivial - looks like you already found the relevant part of the code. Simply remove the "and belongs_to_me?(file)" in both lines and it should work fine. I will add an option to enable this behavior in the next release.
from drivesync.
When I tried removing those, DriveSync started downloading everything which had been shared with me, not just things I had added to My Drive... does the Drive API expose whether something is living under My Drive? If so, then and belongs_to_me?(file)
would become something like and (belongs_to_me?(file) or in_my_drive?(file)
...
from drivesync.
I just went through every single property that the Google Drive API exposes for shared files and the only difference between files that have been added to your Drive and those that have not, is that files in your Drive have a "Parents" property that shows the actual location of the file. Probably not an ideal solution, but adding return true if file.parents != nil and file.parents != []
as the first line in belongs_to_me should accomplish what you want.
I will push this change along with a corresponding entry in the config file and probably some error handling in case you try to delete a file that doesn't belong to you to a development branch soon.
from drivesync.
Related Issues (20)
- Exceptions to blacklist HOT 1
- Doesn't sync HOT 2
- possible data lost HOT 2
- Strange errors in Ubuntu 20.04 LTS HOT 1
- Crash during Suspend/Resume cycle HOT 1
- ASCII-8BIT to UTF-8 Encoding::UndefinedConversionError HOT 2
- Warning Kernel.open
- Error when trying to run it for the first time HOT 1
- Is it possible to use two different versions of drivesync for two different google accounts? HOT 1
- Not sync shared drive HOT 4
- If google drive has additional shared drives his not synced. HOT 1
- Missing log files HOT 1
- Similar to other error messages HOT 1
- Server error when uploading thousends of small files HOT 1
- Drivesync stopped working : "cannot load such file -- google/apis/drive_v3 (LoadError)" HOT 1
- Another Conversion error (\\xC3" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError))
- Uninstall Drivesync HOT 3
- Why are we deleting the local folder on doing a reset?
- Error uploading files HOT 1
- Google OAuth Error 400: Invalid request HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drivesync.