[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: KDirLister & KIO::NetAccess
From: Andras Mantia <amantia () virtualartisans ! com>
Date: 2002-09-30 6:31:55
[Download RAW message or body]
Hi,
1. Is it true that KDirLister doesn't emit the completed() signal if I specify
an empty (but existing) url in the openURL() method?
2. In the NetAccess (or maybe the KIO::stat) sources there is an error, as the
exists function does not work correctly if the specified url is not a file,
but a directory. In this case it always returns true. I don't send a patch as
my KDE HEAD checkout is old (aug 7) (I'm using 3.0.x now.), but here is what
corrects the behaviour:
Original method:
bool NetAccess::exists( const KURL & url )
{
if ( url.isLocalFile() )
return QFile::exists( url.path() );
NetAccess kioNet;
return kioNet.statInternal( url );
}
Patched method:
bool NetAccess::exists( const KURL & a_url )
{
if ( a_url.isLocalFile() )
{
return QFile::exists( a_url.path() );
} else
{
KURL url = a_url;
if (a_url.path().endsWith("/")) url.setPath(a_url.path()+"dummy_file");
NetAccess kioNet;
return kioNet.statInternal( url );
}
}
Andras
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic