mpv-packaging icon indicating copy to clipboard operation
mpv-packaging copied to clipboard

Updater not working with error "The path is not of a legal form."

Open marinosGR opened this issue 3 years ago • 1 comments

The script was exiting with the above error when reaching the https://github.com/shinchiro/mpv-packaging/blob/8bf574c49f65f30eada6a11c78c699ba20910757/mpv-root/installer/updater.ps1#L125

After a lot debugging I realized the the reason for exiting with an error was because I had an older settings.xml at my folder where the x86_64-v3 was missing (there wasn't that option when it was created) resulting the script to crash.

A quick solution for anyone else with same problem is to delete the settings.xml and then running again the updater.bat

I have two suggestions to avoid those kind of cases in the future:

  1. If something is missing from the xml, then run the function to get the user's preference
  2. Add as an option at the beginning of the script for the user to reset his selection (delete the settings.xml) "Do you want to reset your update preferences? (Try this if the script doesn't work for you)"

Also as a feedback, it would be better if we had a lot more time to read the error message.

Thank you for your work and time.

marinosGR avatar Dec 31 '22 14:12 marinosGR

I also did some additional checking and if you have different arch mpv.exe than your preference, also leads to an error after line 214 "Cannot index into a null array."

marinosGR avatar Dec 31 '22 15:12 marinosGR