hardcoded the encoding for reading it. while utf-8 is the default
encoding on many systems, it does not work everywhere.
and when it tries to decode with the ascii decoder, it fails.
Computer clocks are often not set very accurately set, but borg
assumes manifest timestamps are never going back in time.
Ensure that this is actually the case.
note: we also ignore the call's return value in _chunker.c.
both is harmless as the call not working does not cause incorrect function,
just worse performance due to constant flooding of the cache (as if we
would not issue the call).
if anything blows up in the middle of a (first) invocation of close_segment()
and an exception gets raised, it could happen that close_segment() gets called
again (e.g. in Repository.__del__ or elsewhere).
As the self._write_fd was set to None rather late, it would re-enter the if-block
then.
The new code gets the value of self._write_fd and also sets it to None in one tuple
assignment, so re-entrance does not happen.
Also, it uses try/finally to make sure the important parts (fd.close()) gets executed,
even if there are exceptions in the other parts.
"ab" seems to make no sense here (if there is already a (crap, but non-empty) segment file,
we would write a MAGIC right into the middle of the resulting file) and cause #2099.
like '<numberspace>_<version>', e.g. '1.0_01' for version 01 (used in 1.0 maintenance branch).
this avoids overlap and accidental collisions between different release branches.
This problem was found on cygwin/windows due to its small pipe buffer size of 64kiB.
Due to that, bigger (like >64kiB) writes are always only partially done and os.write() returns
the amount of data that was actually sent. the code previously did not use that return value
and assumed that always all is sent, which led to a loss of the remainder of transmission data
and usually some "unexpected RPC data format" error on the client side.
Neither Linux nor *BSD ever do partial writes on blocking pipes, unless interrupted by a
signal, in which case serve() would terminate.
patterns from such files are inserted in the order of appearance on the commandline now.
- allow specifying root paths for borg create and borg extract only by root patterns ("R path")
- adopt test cases and add some test cases for pattern argument parsing
this makes it far, far easier to diagnose issues like an account being
locked:
Got unexpected RPC data format from server:
This account is currently not available.