mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 10:52:51 +00:00
kioslave: replace QFile::exists() with QDir::exists() where applicable
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
87797006e7
commit
c877c3e49b
1 changed files with 3 additions and 3 deletions
|
@ -118,7 +118,7 @@ static void removeDir( const QString& trashDir, const QString& dirName )
|
||||||
|
|
||||||
static void removeDirRecursive( const QString& dir )
|
static void removeDirRecursive( const QString& dir )
|
||||||
{
|
{
|
||||||
if ( QFile::exists( dir ) ) {
|
if ( QDir( dir ).exists() ) {
|
||||||
|
|
||||||
// Make it work even with readonly dirs, like trashReadOnlyDirFromHome() creates
|
// Make it work even with readonly dirs, like trashReadOnlyDirFromHome() creates
|
||||||
KUrl u = KUrl::fromPath( dir );
|
KUrl u = KUrl::fromPath( dir );
|
||||||
|
@ -856,9 +856,9 @@ void TestTrash::moveDirectoryFromTrash()
|
||||||
void TestTrash::trashDirectoryOwnedByRoot()
|
void TestTrash::trashDirectoryOwnedByRoot()
|
||||||
{
|
{
|
||||||
KUrl u;
|
KUrl u;
|
||||||
if ( QFile::exists( "/etc/cups" ) )
|
if ( QDir( "/etc/cups" ).exists() )
|
||||||
u.setPath( "/etc/cups" );
|
u.setPath( "/etc/cups" );
|
||||||
else if ( QFile::exists( "/boot" ) )
|
else if ( QDir( "/boot" ).exists() )
|
||||||
u.setPath( "/boot" );
|
u.setPath( "/boot" );
|
||||||
else
|
else
|
||||||
u.setPath( "/etc" );
|
u.setPath( "/etc" );
|
||||||
|
|
Loading…
Add table
Reference in a new issue