Page 1 of 1

[Solved] UMS.config keeps doubling \s

Posted: Wed May 27, 2020 2:30 pm
by KiyoshiSenpai
Version 9.5.0

In adding a path in UMS.config, when I initially hit save and restart the server, it works perfectly.
However, if I quit and restart the program, suddenly nothing encoded by the encoder in that path will play. I look at the UMS.config file and see that the path keeps adding an extra \ for every one that exists.

For example, if I enter:

vlc_path = C:\Program Files\VideoLAN\VLC\vlc.exe

The next time I quit/reopen UMS, it has changed to

vlc_path = C:\\Program Files\\VideoLAN\\VLC\\vlc.exe

It does this consistently, every time I reboot UMS to test it. It does not happen when clicking "restart server."

Re: UMS.config keeps doubling \s

Posted: Wed May 27, 2020 2:52 pm
by mik_s
the \\ is correct, it's a Java thing where it interprets \ as a special character for escape codes
If you actually need the single \ the code is \\

Re: UMS.config keeps doubling \s

Posted: Wed May 27, 2020 9:45 pm
by Nadahar
To avoid this whole confusion, use "/" instead of "\" in paths in the configuration. UMS will handle both, but there's no such "special handling" tied to "/".