[Solved] UMS.config keeps doubling \s

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Post Reply
KiyoshiSenpai
Posts: 5
Joined: Mon Nov 25, 2019 12:45 pm

[Solved] UMS.config keeps doubling \s

Post 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."
User avatar
mik_s
Moderator
Posts: 1127
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: UMS.config keeps doubling \s

Post 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 \\
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: UMS.config keeps doubling \s

Post 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 "/".
Post Reply