[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdeutils/ark
From:       Martin Koller <m.koller () surfeu ! at>
Date:       2007-04-15 19:29:54
Message-ID: 1176665394.949265.24589.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 654322 by mkoller:

BUG: 129446

Don't crash with files starting with "/"



 M  +4 -0      filelistview.cpp  


--- branches/KDE/3.5/kdeutils/ark/filelistview.cpp #654321:654322
@@ -127,6 +127,8 @@
 		QString name = text;
 		if ( name.endsWith( "/" ) )
 			name = name.left( name.length() - 1 );
+		if ( name.startsWith( "/" ) )
+			name = name.mid( 1 );
 		int pos = name.findRev( '/' );
 		if ( pos != -1 )
 			name = name.right( name.length() - pos - 1 );
@@ -504,6 +506,8 @@
 
 	if ( name.endsWith( "/" ) )
 		name = name.left( name.length() -1 );
+	if ( name.startsWith( "/" ) )
+		name = name.mid( 1 );
 	// Checks if this entry needs a parent
 	if ( !name.contains( '/' ) )
 		return static_cast< FileLVI* >( 0 );
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic