GithubHelp home page GithubHelp logo

Comments (5)

memeplex avatar memeplex commented on June 2, 2024

I'm not 100% sure I'm correctly interpreting the option documentation.

Anyway, my use case is that I want to start with a "checkout" or "clone" of the server. For example, if I'm sync'ing my dotfiles to a new computer I don't want the .bashrc installed by default to override my custom .bashrc in drive at any rate!

from grive2.

memeplex avatar memeplex commented on June 2, 2024

Seems like

        // if remote is modified
        if ( remote.MTime() > m_mtime )
        {
            Log( "file %1% is changed in remote", path, log::verbose ) ;
            m_state = remote_changed ;
        }

in Resource.cc is completely ignoring last_change, which is the mechanism by which force is implemented:

    if ( force )
    {
        m_last_change = DateTime() ;
        m_last_sync = DateTime::Now() ;
    }

from grive2.

memeplex avatar memeplex commented on June 2, 2024

This could be a fix:

        // if remote is modified
        if ( remote.MTime() > last_change || remote.MTime() > m_mtime )
        {
            Log( "file %1% is changed in remote", path, log::verbose ) ;
            m_state = remote_changed ;
        }

but I think it would be more readable to explicity check the force flag instead of last_change.

from grive2.

vitalif avatar vitalif commented on June 2, 2024

You're right, that's another bug introduced while trying to fix something...

I think the correct fix would be to change m_last_change to m_mtime in if(force)

That's of course nonsense, these are properties of different classes

from grive2.

vitalif avatar vitalif commented on June 2, 2024

See the master branch. I've done a major rework today, adding support for local checksum and mtime cache ("index"). Force option should also work now :)

from grive2.

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.