From c71e91200a19fdab5ccfe34b39c76ac14d96cfa3 Mon Sep 17 00:00:00 2001 From: Brian <18603393+brian6932@users.noreply.github.com> Date: Sat, 23 Sep 2023 04:20:05 -0400 Subject: [PATCH] streamlink: trim custom paths (#4834) this makes sure no spaces are accidentally left in the custom path Co-authored-by: Rasmus Karlsson --- CHANGELOG.md | 1 + src/util/StreamLink.cpp | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5234d864..60a293e8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Minor: Migrate to the new Get Channel Followers Helix endpoint, fixing follower count not showing up in usercards. (#4809) - Minor: The account switcher is now styled to match your theme. (#4817) - Minor: Add an invisible resize handle to the bottom of frameless user info popups and reply thread popups. (#4795) +- Bugfix: Trimmed custom streamlink paths on all platforms making sure you don't accidentally add spaces at the beginning or end of its path. (#4834) - Bugfix: Fixed a performance issue when displaying replies to certain messages. (#4807) - Bugfix: Fixed a data race when disconnecting from Twitch PubSub. (#4771) - Bugfix: Fixed `/shoutout` command not working with usernames starting with @'s (e.g. `/shoutout @forsen`). (#4800) diff --git a/src/util/StreamLink.cpp b/src/util/StreamLink.cpp index 379c2699a..f83bc8cbc 100644 --- a/src/util/StreamLink.cpp +++ b/src/util/StreamLink.cpp @@ -75,17 +75,16 @@ namespace { QProcess *createStreamlinkProcess() { - auto p = new QProcess; + auto *p = new QProcess; - const QString path = [] { + const QString path = []() -> QString { if (getSettings()->streamlinkUseCustomPath) { - return getSettings()->streamlinkPath + "/" + getBinaryName(); - } - else - { - return QString{getBinaryName()}; + const QString path = getSettings()->streamlinkPath; + return path.trimmed() + "/" + getBinaryName(); } + + return {getBinaryName()}; }(); if (Version::instance().isFlatpak())