Bug 432156

Summary: KNewFileMenu: cannot create new file for remote protocols like ftp
Product: [Frameworks and Libraries] frameworks-kio Reporter: Jean-Baptiste Mardelle <jb>
Component: generalAssignee: KIO Bugs <kio-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: a.samirh78, kdelibs-bugs, nate
Priority: NOR    
Version: 5.78.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Cannot create new file

Description Jean-Baptiste Mardelle 2021-01-26 12:35:29 UTC
Created attachment 135205 [details]
Cannot create new file

SUMMARY


STEPS TO REPRODUCE
1. Open an FTP location in Dolphin
2. Try to create a new folder or file


OBSERVED RESULT

The "File already exists" popup incorrectly shows up, and the "Ok" button is disabled, you cannot create files / folders

EXPECTED RESULT

You should be able to create new files / folders

This is most likely fixed by changing the KIO::statDetails parameter in:
https://invent.kde.org/frameworks/kio/-/blob/master/src/filewidgets/knewfilemenu.cpp#L1212

From the doc, KIO::statDetails cannot reliably check a file existence using http / ftp protocols. Using "SourceSide" as currently, when the existence cannot be determined, it is assumed to exist, so we cannot create the new file.

Changing the parameter to DestinationSide, the file is assumed to not exist when it cannot be determined.



SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Ahmad Samir 2021-04-21 14:54:08 UTC

*** This bug has been marked as a duplicate of bug 429541 ***