Bug 426272

Summary: knetattch allows name with forward slash ‘/’, but then creates subdirectory, hiding the entry
Product: [Applications] knetattach Reporter: Erik Quaeghebeur <bugs.kde.org>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version: 5.18.5   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Erik Quaeghebeur 2020-09-07 09:38:51 UTC
SUMMARY
I work at an institution with a forward slash ‘/’ in its (short) name, let's use ‘Pre/Post’ as an example.
To name the various network shares for this institute, I used that name in the Name field presented by KNetattach. It is accepted, but the share didn't appear under ‘remote:/’. Some searching landed me in $HOME/.local/share/remoteview, where there was a ‘Pre’ directory within which were files such as ‘Post Scan share.desktop’.

I think it is fine that KNetattach accepts a forward slash, but then it should mangle the ‘/’ and not create a directory, because that is not what the user intended and clearly not what the ‘remote:/’ resource expects (it does not show the subdirectory). But if mangling causes other issues, I think it is advisable to just disallow ‘/’.

STEPS TO REPRODUCE
1. Open KNetattach
2. Create entry with ‘/’ in name
3. Ask for icon to be created

OBSERVED RESULT
No entry in ‘remote:/’

EXPECTED RESULT
Entry in ‘remote:/’

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2