-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Rename fails in some circumstances on WSL #39
Comments
Ouch! Sorry about your data loss, and thanks for such a detailed report. A first look at the code leaves me baffled, as the only call to Please could you confirm what version of recode you're using? |
I'm using the Ubuntu package which seems to be 3.6-24... am I in the wrong place? I didn't look too closely at the package info yesterday so I might be in the wrong place.
The --version on mine doesn't seem like it's been updated in quite a while
|
I would certainly appreciate a report against the latest 3.7.x. I am working with Debian to get 3.7 packaged, but it's taking a while! |
Okay on 3.7.12 it seems to work properly on NTFS but still fails in the same way on exFAT, albeit with a different error message, same end result though -- original file gone, .tmp file retained, and no easy way to figure out which .tmp file came from which file if you ran it on a lot of files. exFAT filesystem:
NTFS filesystem:
I saw there was a --verbose option so I gave it a try on exFAT but it didn't provide a whole lot of info
This could possibly be a WSL bug or incompatibility. I should probably file a bug with WSL but it'd be useful to know if this happens on a pure Linux system to or only with WSL. Unfortunately I'm not able to test on pure Linux currently. Just throwing out ideas, maybe the temp file name could just be the real filename with .tmp appended to it? That way if something goes wrong and you end up with a bunch of .tmp files you at least know what the names are supposed to be. |
Doing further testing... it looks like 3.7.12 is broken on FAT32 filesystems as well, even though the older version worked properly on FAT32...
So in summary:
No issues on my native WSL filesystem which I think is ext4, but my space there is limited so I basically have to use my mounted Windows drives for a lot of stuff. |
Thanks for your further investigation. If I try your example on a FAT32 filing system attached to my Ubuntu machine, it works fine, so the filing system doesn't appear to matter. As you've observed, it's the At first blush it looks as though for some reason |
|
I filed a bug on WSL: microsoft/WSL#8201 The error message on 3.7 is definitely more useful than what I was initially encountering on 3.6, because it does actually show the original & temporary filename together. So on 3.7 at least, if the program output hasn't been lost, renaming the files back manually isn't a huge deal. The files I converted yesterday on 3.6 though are probably a lost cause |
Sorry I can't help more, and I hope someone at MS or with better knowledge of WSL can work out what's going wrong here. There may well be a fix or workaround even if it's not a recode bug. |
I am running Ubuntu WSL
I was running the following to find files with Windows-1252 encoding and convert them to UTF-8:
Unfortunately it seems that recode does not work properly with NTFS filesystems at all
I ended up with hundreds of these messages:
All of the original files (and all filename information) are gone
The .tmp files are in fact UTF-8 but there's no way to know what the original filenames were so the files are effectively gone/useless
even if I had the original filenames there's no way to know which .tmp file correlates with which original filename
it's not uncommon for Linux programs to not work perfectly on NTFS but I've never encountered anything this bad before
I "lost" nearly 400 files and it would have been more if I hadn't noticed the errors and aborted the job
Here's an example using a single file:
With a single file it's not a big deal to rename the .tmp file back to the original filename (as long as you have the original filename) but when many files are affected it seems impossible to recover from, especially if you don't have the original filenames.
I verified the same thing happens even without the
-t
I verified that this happens on both NTFS and exFAT but does NOT happen on FAT32
this issue might or might not be specific to WSL systems; a pure Linux system with an NTFS or exFAT filesystem mounted might or might not behave differently; I'm unable to test this
The text was updated successfully, but these errors were encountered: