Coder Social home page Coder Social logo

Comments (3)

carenas avatar carenas commented on July 26, 2024

This is driven by python, and the file list sent to stdin is from (python) '\0'.join(file_list)

assuming this line comes from vbr.py, wouldn't the generated list of files to transfer be incomplete and missing the trailing NUL?, does using '\0'.join(file_list)+'\0' instead make a difference?

from rsync.

JoshLitt avatar JoshLitt commented on July 26, 2024

@carenas I will try adding a trailing null. Looking at the file I used for the test I mentioned of putting that file list in a null-separated file and running command, I see that actually did have a trailing null (can't recall, but I think I generated it with sed replacing newlines with null, and it had a trailing newline.)

from rsync.

JoshLitt avatar JoshLitt commented on July 26, 2024

Well, that was it. But whether or not it fails as it did may have to do with internal buffer mgmt boundaries. If I put the above file list in a null-separated list with a terminating null, it works. Without the terminating null, it fails. Changing the vbr.py script as you suggested ensures it too works. Yet if I use a list of 2 filenames, it works regardless of the terminating null.
I checked the rsync code to see where this sensitivity might be, and it wasn't obvious.

However, now that I understand this is often used in combination with find ... -print0, it makes sense to have a trailing null. The null isn't a field delimiter as much as terminator, though the man page uses both words for this in different places. That said, one could also expect that this case (no final NULL) should work. For example, xargs -0 seems to have no issue with this.

from rsync.

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.