Code Monkey home page Code Monkey logo

Comments (3)

MStadlmeier avatar MStadlmeier commented on May 29, 2024

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.

kc9jud avatar kc9jud commented on May 29, 2024

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.

MStadlmeier avatar MStadlmeier commented on May 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.