-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
WIP Fix #11349 - Backups failing for symlink files #11417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Well this was passing prior to #11269 😅 promise. I think it has to do with the guards added for |
Address changes in neovim#11269
Traivs failure looks unrelated? Failing in the However the appveyor is failing bc I added a assertion/expectation about the final contents of the symlink file..., but I remember vaguely that Windows has some weirdness around symlinks... probably okay that I remove those intermediary expectations right? |
Any help digging into the "why" behind the travis & appveyor failures would be appreciated. I am very sub-par where Windows is concerned, and I can't duplicate the locale spec failure (nor have I comprehended yet how it relates to this PR) in travis. |
travis failure is a UBSAN failure (looks like you already fixed it):
|
#11269 (comment) shows how to trick AppVeyor into showing hints :) Just compare the value using |
c3ad912
to
d83ecd0
Compare
@justinmk not sure if this is the problem, but libuv
So I'm wondering if, by moving to using libuv's copyfile for backup in #8288 we inherented an issue with symlink copy-on-write? Basically I'm wondering if we aren't creating backups for symlniks bc the original file is actually the "link" to the copy-on-write? basically, with how libuv implements the copyfile for windows, I'm wondering if it inherently means that symlinks on windows wants a change to the original file before the "new path" (the backup in this usecase) is written. |
Following this last test with Appveyor, I'm even more convinced that it has to do with symlinks behavior with |
Is this PR still blocked for Windows? Maybe it's fixed now after libuv was updated. |
Hey! I'll check this weekend and bring this PR up-to-date. I'm also hopeful that the libuv update solved this issue. |
Oof I completely forgot about this... I just made my |
If you want to reduce the places to go and look... you can open this PR back up @justinmk and I can take a stab at it again? |
Ah nevermind I see the contributing says to just open a draft PR so I did that instead 😓 |
Fixes #11349
Problem
Prior to #9709, we only when down the copy route if we could open the file, otherwise we would cycle through the backupdir options until/if we could. After that PR, we moved where the
break
was and if the first encountered backupdir + backup file option can't be written we fail and break out of the backupdir loop.Solution
Continue through the loop of backupdir options (still recording the error message if we can't copy), then clear out error messages if we finally succeed