forked from j62/ctbrec
1
0
Fork 0

Make sure that the recordingsDir path doesn't end with a /

This commit is contained in:
0xboobface 2019-06-07 21:23:37 +02:00
parent e08d895054
commit 60aaacc294
1 changed files with 3 additions and 0 deletions

View File

@ -62,6 +62,9 @@ public class Config {
BufferedSource source = buffer.readFrom(fin);
settings = adapter.fromJson(source);
settings.httpTimeout = Math.max(settings.httpTimeout, 10_000);
if (settings.recordingsDir.endsWith("/")) {
settings.recordingsDir = settings.recordingsDir.substring(0, settings.recordingsDir.length() - 1);
}
} catch(Throwable e) {
settings = OS.getDefaultSettings();
for (Site site : sites) {