mikhailru created this revision. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. mikhailru requested review of this revision.
REVISION SUMMARY At present, when one tries to share files with certain names via Telegram using Dolphin's share menu, Dolphin crashes (names contain unbalanced quotes) or a wrong name is passed to Telegram (names with spaces). The root cause is KShell::splitArgs returning empty QStringList or doing wrong splits for the above classes of names. This patch postpones the substitution of "%u" with the actual filename until splitting is done, thus avoiding undesired behavior. TEST PLAN 1. Create test files: $ echo test | tee test\ .txt | tee test\'.txt > test\".txt 2. Start Dolphin and share the files via Telegram. 3. No errors and crashes should occur in the process. REPOSITORY R495 Purpose Library BRANCH telegram-sharing-fix (branched from master) REVISION DETAIL https://phabricator.kde.org/D18853 AFFECTED FILES src/plugins/telegram/telegramplugin.cpp To: mikhailru Cc: kde-frameworks-devel, michaelh, ngraham, bruns