chelh / VBASync

Cross-platform tool to synchronize macros from an Office VBA-enabled file with a version-controlled folder
Other
161 stars 46 forks source link

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

Open native-api opened 7 years ago

native-api commented 7 years ago
native-api commented 7 years ago

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 commented 7 years ago

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.

chelh commented 7 years ago

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.

native-api commented 7 years ago

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.