Bug 495993

Summary: kioclient cp interprets target file name as HTTP URL
Product: [Plasma] kde-cli-tools Reporter: Grósz Dániel <groszdanielpub>
Component: generalAssignee: Aleix Pol <aleixpol>
Status: REPORTED ---    
Severity: minor    
Priority: NOR    
Version First Reported In: 6.2.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Grósz Dániel 2024-11-09 00:51:07 UTC
SUMMARY
If a file name (that doesn't currently exist) is specified without any slashes as the destination of a copy or move command, kioclient tries and fails to upload the source file to a HTTP URL instead of interpreting it as a relative path in the current directory, as likely expected.

STEPS TO REPRODUCE
1. touch a
2. (make sure no file named b exists in the current directory)
3. kioclient copy a b

OBSERVED RESULT
kioclient: An unexpected error (0) occurred while attempting to upload http://b.

EXPECTED RESULT
Equivalent to cp a b.

Of course there's little point in using kioclient to copy local files, but the same happens if the source is a URL.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20241105
KDE Plasma Version: 6.2.2
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.5-1-default (64-bit)
Graphics Platform: X11