KNewFileMenu: Fix suggestion of new filename when file already exist in desktop

Review Request #128499 - Created July 22, 2016 and submitted

Information
Chinmoy Ranjan Pradhan
kio
master
Reviewers
kdeframeworks
dfaure

When creating a new file, if a file with the default name already exist then a new name is suggested by KIO::suggestName. Now this works fine until the scheme of file's url is "file" but in case the scheme is "desktop" (like when the url in dolphin is set to desktop:/ or "Folder View Settings > Location" is set to desktop:/) then the check for file's existence fails because QFile::exists doesn't understand the "desktop" scheme. So KIO::suggestName is not called and no new filename is suggested in case a file with the same filename already exist. To fix this i used KNewFileMenuPrivate::mostLocalUrl in KNewFileFileMenu::executeRealFileorDir which will resolve "desktop:/" to the user's desktop path.


  

Issues

  • 0
  • 3
  • 1
  • 4
Description From Last Updated
Chinmoy Ranjan Pradhan
David Faure
David Faure
Chinmoy Ranjan Pradhan
David Faure
Chinmoy Ranjan Pradhan
David Faure
Chinmoy Ranjan Pradhan
Chinmoy Ranjan Pradhan
David Faure
Chinmoy Ranjan Pradhan
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 2dd13d36f3f9810c8d92acfff89e9cd6e1c63689 by David Faure on behalf of Chinmoy Ranjan Pradhan to branch master.
Loading...