Fix purge_nonexistent_images.bat to correctly handle images which have cyrillic (or other alphabets) in the path#20916
Conversation
…ve deletion logic
TurboGit
left a comment
There was a problem hiding this comment.
Looks ok by me but I'd like the review of a Windows expert;
@wpferguson : Can you review please? TIA
|
@victoryforce are you able to test this? |
|
@mishavoloshchuk : Nice fix – verified the temp-file workaround and the One optional polish from #21245: save and restore the original codepage around the section that needs UTF-8, rather than leaving the user's console at for /f "tokens=4" %%a in ('chcp') do set "OLD_CP=%%a"
chcp 65001 >nul
:: ... loop using the temp file ...
chcp %OLD_CP% >nulNot blocking – the current approach works correctly. Only matters if someone calls this script from another batch file that expects a specific codepage afterwards, which is unlikely for a maintenance tool. Up to you. |
|
@andriiryzhkov Thanks for the suggestion! Implemented it in the last commit. I also verified that the script still works correctly after that change. |
I've made a fix for the purge_nonexistent_images.bat removes existing files / #20915 issue I recently added. I used Claude, because I'm not very proficient in .bat scripts. I've checked it and works completely fine and now it only removes the images that are really missing.
Here is some description from Claude itself: