VBASync icon indicating copy to clipboard operation
VBASync copied to clipboard

Paths in VBASync UI with national characters are restored incorrectly on session auto-restore

Open native-api opened this issue 8 years ago • 4 comments

  • Specify path to project folder and/or Excel file that contain national characters
  • Save session as vbasync.ini into the current folder
  • Restart VBASync (do NOT load a session manually)
  • => Paths are restored automatically, but become mojibake
  • Load the session manually => paths are okay
  • "Load Last session" => paths are restored as mojibake

native-api avatar Jul 08 '17 20:07 native-api

Paths as they are entered: 2017-07-08 23_38_05-vba sync tool

Paths as they're incorrectly restored: 2017-07-08 23_42_20-vba sync tool

native-api avatar Jul 08 '17 20:07 native-api

Not fixed in https://github.com/chelh/VBASync/issues/35#issuecomment-313894860. Looks like you're encoding the string twice. Or encoding it on output but not decoding on input or something. LastSession.zip

Logically speaking, LastSession.ini should be handled the same way as VBASync.ini.

native-api avatar Jul 14 '17 05:07 native-api

Hm, did you use the second set of binaries I posted in #35? The first set, which would be in your e-mail, doesn't actually have the fix fot this bug.

chelh avatar Jul 14 '17 08:07 chelh

I downloaded the binaries today, from the ticket UI, right before testing them and reporting the results. I can confirm that "restore last session" now works correctly, but that's not all.

Note the reproduction steps, specifically, the vbasync.ini in the current folder that triggers session auto-restore. I created VBASync.lnk in the project's folder, setting "work folder" to . and saving vbasync.ini to the project's folder, too, then running the program via the shortcut. But the same happens when I run the exe directly after having saved vbasync.ini into the exe's folder. I thought that pointing to the "current folder" was enough information since in Windows, "current folder" is a very specific characteristic of a process that is set in a very specific way and which you can always check with e.g. Process Explorer.

After the corruption on auto-restore happens and I quit the program, LastSession.ini becomes corrupted, too, blindly saving the incorrect data there.

native-api avatar Jul 14 '17 09:07 native-api