All of lore.kernel.org
 help / color / mirror / Atom feed
From: Colin Watson <cjwatson@ubuntu.com>
To: "Theodore Y. Ts'o" <tytso@mit.edu>
Cc: Paul Menzel <pmenzel@molgen.mpg.de>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	linux-ext4@vger.kernel.org, Dimitri John Ledkov <xnox@ubuntu.com>
Subject: Re: ext4: Funny characters appended to file names
Date: Sun, 6 Dec 2020 17:44:14 +0000	[thread overview]
Message-ID: <20201206174414.GA21819@riva.ucam.org> (raw)
In-Reply-To: <20201206173746.GN13361@riva.ucam.org>

On Sun, Dec 06, 2020 at 05:37:46PM +0000, Colin Watson wrote:
> I don't know why Dimitri chose to explicitly remove the new files first
> rather than just renaming over the top and then removing any leftovers
> at the end; that seems unnecessarily risky.  Though this is code that's
> apparently supposed to work on Windows as well, and the MoveFile
> function that's used to implement grub_util_rename there requires the
> destination file not to exist (sigh), so maybe it had something to do
> with that.

Incidentally, if this is actually the reason, then I think this would be
a viable replacement:

  ret = !MoveFileEx (windows_from, windows_to, MOVEFILE_REPLACE_EXISTING);

Not that I really speak the Windows API ...

-- 
Colin Watson (he/him)                              [cjwatson@ubuntu.com]

  reply	other threads:[~2020-12-06 17:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04 14:30 ext4: Funny characters appended to file names Paul Menzel
2020-12-04 15:28 ` Theodore Y. Ts'o
2020-12-04 15:39   ` Paul Menzel
2020-12-04 18:05     ` Theodore Y. Ts'o
2020-12-05 19:34       ` Paul Menzel
2020-12-06 14:44         ` Colin Watson
2020-12-06 15:15           ` Theodore Y. Ts'o
2020-12-06 17:37             ` Colin Watson
2020-12-06 17:44               ` Colin Watson [this message]
2020-12-06 18:27           ` Colin Watson
2020-12-07  2:00             ` Dimitri John Ledkov
2020-12-04 20:02 ` Andreas Dilger

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

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

  git send-email \
    --in-reply-to=20201206174414.GA21819@riva.ucam.org \
    --to=cjwatson@ubuntu.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=tytso@mit.edu \
    --cc=xnox@ubuntu.com \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.