Git Product home page Git Product logo

Comments (4)

nicolalamacchia avatar nicolalamacchia commented on April 26, 2024

You can try by commenting out this line. It's a quick hack, but it works for me. Be careful about that, you should know what you're doing.

Given the way the code is structured, it's a bit difficult for me to work on a quick and stable patch. I might try to have a look in the following days, but maybe @divVerent has a suggestion for a better solution.

from adb-sync.

dillongaf avatar dillongaf commented on April 26, 2024

Okay, I'll give that a try sometime. Thanks heaps.

Just out of curiosity, what does commenting out that one line change?
Does it just ignore the error and continue copying files? Would this then ignore other failed copy's?
I'm not very knowledgeable when it come to coding.

from adb-sync.

nicolalamacchia avatar nicolalamacchia commented on April 26, 2024

IIRC, errors during file copy are handled in a different way, since in that case adb gets called directly, not using that Popen wrapper (see code from this line and this line).

That line ignores command lines exiting with a non-zero status code (which might signal an error). But it does in a bit of a strange way.

Some processes exit with non-zero status code just to tell the user that they have completed the task partially or that some error occurred in performing the task, but the task was completed anyway.

In this case ls is throwing an error because it encounters .android_secure, but it's still able to list the other files (try it by yourself, typing: adb shell ls -l <target folder containing .android_secure> in a shell, then type echo $? as the next command, you should see a non-zero number).

You can also see that that error is not suddenly breaking the execution of adb-sync, because the rest of the nested calls are performed correctly, and that takes some time (depending on how big is the files structure in that filesystem). The program breaks when exiting the level of the call which received the first error (unless other errors are raised somewhere in the middle).

As you can see that flow is not optimal, since the error is basically deferred to the end of a potentially very long walk through your file tree, and it's not necessarily a breaking error.

from adb-sync.

dillongaf avatar dillongaf commented on April 26, 2024

I see, that makes so much more sense to me now. Thanks for taking the time to reply and explain it to me, hopefully I can set-up a one step backup process now when I get some free time.

from adb-sync.

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.