unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: sb@dod.no
To: 50988@debbugs.gnu.org
Subject: bug#50988: 26.3; gnus-cloud gets wrong chunk byte count writing sync from windows
Date: Sun, 03 Oct 2021 10:34:06 +0200	[thread overview]
Message-ID: <86o886jym9.fsf@dod.no> (raw)

This happens for me on emacs 26.3, but has happened ever since I first
tried to use gnus-cloud in 2016, so I've never been able to use
gnus-cloud (I've continued to use its predecessor gnus-sync, but with
emacs 27, gnus-sync no longer worked).

When gnus-cloud-upload-all-data is run in gnus on emacs on windows, the
byte count in the sync data chunks is wrong, so that the data is broken
when attemting to sync on a debian machine.

The first chunk has the following header:
(:type :file :file-name "~/.gnus.el" :timestamp "2021-09-19T15:04:33+0200" :length 16241)

The byte count here is 16241, but it should have been 15754.

This results in the contents of the score files that follows .gnus.el to
be copied into .gnus.el and the .gnus.el file becomes unparsable.

The difference in length corresponds to the number of lines in .gnus.el,
so I'm guessing it's because the CR in CRLF line endings is stripped
away.

The place where the length is set, is here
  https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/gnus/gnus-cloud.el#n98

I've tried taking the length of the string instead of the size of the
buffer, but the count for .gnus.el still came out as 16241 (so the CR
stripping doesn't take place there).

I've also, as an experiment, replaced insert-file-contents-literally,
with insert-file-contents, and then windows gnus wrote data that
gnus-cloud-download-all-data on debian gnus could read.

But that's probably not a fix, since insert-file-contents-literally is
used intentionally?

This is with
(gnus-cloud-storage-method nil)
which is what I've been using for debugging because attempts to using
base64 with gzip caused error messages of the type "not base64"
(presumably also because the byte count was wrong?).





             reply	other threads:[~2021-10-03  8:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-03  8:34 sb [this message]
2021-10-03  9:15 ` bug#50988: 26.3; gnus-cloud gets wrong chunk byte count writing sync from windows Eli Zaretskii
2021-10-03 10:32   ` Steinar Bang
2021-10-03 11:04     ` Eli Zaretskii
2022-09-12 10:24 ` Lars Ingebrigtsen
2022-09-13 17:28   ` Steinar Bang
2022-09-14 12:34     ` Lars Ingebrigtsen
2022-09-14 15:04       ` Steinar Bang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86o886jym9.fsf@dod.no \
    --to=sb@dod.no \
    --cc=50988@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).