[Bug 174126] file sharing causing error
Nicolas Lécureuil
neoclust at mandriva.org
Mon Jan 5 06:36:56 GMT 2009
http://bugs.kde.org/show_bug.cgi?id=174126
--- Comment #5 from Nicolas Lécureuil <neoclust mandriva org> 2009-01-05 07:36:55 ---
This patch fixes the crash for me. Can i commmit it ?
--- kio/kio/knfsshare.cpp.orig 2009-01-04 20:18:07.000000000 +0100
+++ kio/kio/knfsshare.cpp 2009-01-04 20:33:20.000000000 +0100
@@ -183,8 +183,11 @@
bool KNFSShare::isDirectoryShared( const QString & path ) const
{
+ kDebug(7000) << "Path Shared dir:" << path;
QString fixedPath = path;
- if ( path[path.length()-1] != '/' )
+ kDebug(7000) << "fixedPath Shared dir:" << fixedPath;
+
+ if ( !path.isEmpty() && path[path.length()-1] != '/' )
fixedPath += '/';
return d->sharedPaths.contains(fixedPath);
--- kio/kio/ksambashare.cpp~ 2008-08-20 21:54:05.000000000 +0200
+++ kio/kio/ksambashare.cpp 2009-01-04 23:43:56.000000000 +0100
@@ -213,7 +213,7 @@
bool KSambaShare::isDirectoryShared( const QString & path ) const
{
QString fixedPath = path;
- if ( path[path.length()-1] != '/' )
+ if ( !path.isEmpty() && path[path.length()-1] != '/' )
fixedPath += '/';
return d->sharedPaths.contains(fixedPath);
--
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Unassigned-bugs
mailing list