summaryrefslogtreecommitdiffstats
path: root/tdeioslave
diff options
context:
space:
mode:
Diffstat (limited to 'tdeioslave')
-rw-r--r--tdeioslave/remote/remoteimpl.cpp5
-rw-r--r--tdeioslave/trash/discspaceutil.cpp15
2 files changed, 15 insertions, 5 deletions
diff --git a/tdeioslave/remote/remoteimpl.cpp b/tdeioslave/remote/remoteimpl.cpp
index a0f37b624..51182686f 100644
--- a/tdeioslave/remote/remoteimpl.cpp
+++ b/tdeioslave/remote/remoteimpl.cpp
@@ -218,7 +218,8 @@ void RemoteImpl::createEntry(TDEIO::UDSEntry &entry,
{
kdDebug(1220) << "RemoteImpl::createEntry" << endl;
- KDesktopFile desktop(directory+file, true);
+ TQString desktopPath(directory + file);
+ KDesktopFile desktop(desktopPath, true);
kdDebug(1220) << "path = " << directory << file << endl;
@@ -237,6 +238,8 @@ void RemoteImpl::createEntry(TDEIO::UDSEntry &entry,
addAtom(entry, TDEIO::UDS_ICON_NAME, 0, icon);
addAtom(entry, TDEIO::UDS_LINK_DEST, 0, desktop.readURL());
+
+ addAtom(entry, TDEIO::UDS_LOCAL_PATH, 0, desktopPath);
}
bool RemoteImpl::statNetworkFolder(TDEIO::UDSEntry &entry, const TQString &filename) const
diff --git a/tdeioslave/trash/discspaceutil.cpp b/tdeioslave/trash/discspaceutil.cpp
index e231b901c..bca944e39 100644
--- a/tdeioslave/trash/discspaceutil.cpp
+++ b/tdeioslave/trash/discspaceutil.cpp
@@ -52,10 +52,17 @@ unsigned long DiscSpaceUtil::sizeOfPath( const TQString &path )
TQFileInfoListIterator it( *infos );
unsigned long sum = 0;
- TQFileInfo *info = 0;
- while ( (info = it.current()) != 0 ) {
- if ( info->fileName() != "." && info->fileName() != ".." )
- sum += sizeOfPath( info->absFilePath() );
+ const TQFileInfo *info = nullptr;
+ while ((info = it.current()))
+ {
+ if (info->isFile())
+ {
+ sum += info->size();
+ }
+ else if (info->fileName() != "." && info->fileName() != "..")
+ {
+ sum += sizeOfPath(info->absFilePath());
+ }
++it;
}