D18853: Fix sharing files with spaces or quotes in names via Telegram

Mikhail Rudenko noreply at phabricator.kde.org
Fri Feb 8 14:55:32 GMT 2019


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190208/c8b3f9f9/attachment.html>


More information about the Kde-frameworks-devel mailing list