summaryrefslogtreecommitdiffstats
path: root/tdeioslave/trash/ktrashpropsdlgplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdeioslave/trash/ktrashpropsdlgplugin.cpp')
-rw-r--r--tdeioslave/trash/ktrashpropsdlgplugin.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/tdeioslave/trash/ktrashpropsdlgplugin.cpp b/tdeioslave/trash/ktrashpropsdlgplugin.cpp
index 87a70ae45..1677c282a 100644
--- a/tdeioslave/trash/ktrashpropsdlgplugin.cpp
+++ b/tdeioslave/trash/ktrashpropsdlgplugin.cpp
@@ -55,14 +55,17 @@ KTrashPropsDlgPlugin::KTrashPropsDlgPlugin( KPropertiesDialog *dialog, const cha
return;
KFileItem *item = dialog->items().first();
+ KURL itemUrl = item->url();
+ if (!(itemUrl.protocol() == "trash" && item->name() == "."))
+ {
+ // Check for a desktop file in case the protocol is not "trash"
+ if (!KPropsDlgPlugin::isDesktopFile(item))
+ return;
- if ( !KPropsDlgPlugin::isDesktopFile( item ) )
- return;
-
- KDesktopFile deskFile( item->url().path(), true /* readonly */ );
-
- if ( deskFile.readURL() != "trash:/" )
- return;
+ KDesktopFile deskFile( itemUrl.path(), true /* readonly */ );
+ if ( deskFile.readURL() != "trash:/" )
+ return;
+ }
TDEGlobal::locale()->insertCatalogue( "tdeio_trash" );