Bug 269530

Summary: Document browser (not filesystem browser) interprets backslash in filename as dir seperator
Product: [Applications] kate Reporter: Thomas Baag <thomas>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Thomas Baag 2011-03-27 12:45:18 UTC
Version:           unspecified (using KDE 4.6.1) 
OS:                Linux

The document browser (not the filesystem browser) interprets a backslash in the filename of an open file as a dir seperator and creates a node in the tree for the not realy existing folder-parts of the filename.

Reproducible: Always

Steps to Reproduce:
In Linux create a file called "a\b\c.txt" and open this file with kate.

Actual Results:  
Opened documents browser shows tree like:
"b" -> "c.txt"

Expected Results:  
Opened documents browser should show a tree with a single node like:
"a\b\c.txt"
Comment 1 Joseph Wenninger 2012-10-24 10:52:01 UTC
Git commit 597498677c7ffc966a1c5be098695679aa5de504 by Joseph Wenninger.
Committed on 24/10/2012 at 12:00.
Pushed by jowenn into branch 'master'.

Fix for #269530 Usage of QDir::separator() instead of regexp \/\\\\ for directory separtors. Not sure on windows, is it possible to have a file with a somehow escaped \ in the filename. This would still produce a wrong tree hierarchy

M  +6    -9    kate/plugins/filetree/katefiletreemodel.cpp

http://commits.kde.org/kate/597498677c7ffc966a1c5be098695679aa5de504
Comment 2 Thomas Baag 2012-10-25 18:43:33 UTC
There will be no problem with Windows, cause it internally uses "/" as fileseperator. See NTFS wikipedia page. Thanks for fixing this Bug.