Thread (12 messages) 12 messages, 6 authors, 2020-12-07

Re: ext4: Funny characters appended to file names

From: Colin Watson <hidden>
Date: 2020-12-06 17:45:14

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]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help