Fix sharing files with spaces or quotes in names via Telegram
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:
- Create test files:
$ echo test | tee test\ .txt | tee test\'.txt > test\".txt
- Start Dolphin and share the files via Telegram.
- No errors and crashes should occur in the process.
Reviewers: apol
Reviewed By: apol
Subscribers: kde-frameworks-devel
Tags: Frameworks
Differential Revision: https://phabricator.kde.org/D18853