Version: (using KDE Devel) Installed from: Compiled sources OS: Linux When I trash a file, my second harddisk is woken up, which causes long delays, noise and wastes energy. My 2nd HD is only used as a backup partition and is thus very rarely used. I don't know why trashing a file uses that disk, since the file I am moving to trash is not on that disk. There is a trash folder at the root of my backup partition, but it is empty and, as already said, the file I trashed did not move there.
On Wednesday 22 December 2004 13:52, Thomas McGuire wrote: > When I trash a file, my second harddisk is woken up, which causes long delays, noise and wastes energy. > My 2nd HD is only used as a backup partition and is thus very rarely used. > I don't know why trashing a file uses that disk, since the file I am moving to trash is not on that disk. Hmm, that's because kio_trash looks at all available trash directories on startup. It should be possible to do that a bit more "on demand" I guess. Thanks for your kio_trash reports, I'll look into those.
CVS commit by faure: Provide stability in the trash IDs, so that restoring or asking for properties works even kio_trash gets killed because idle. A bit more caching of the trash dirs too, might help 95654 (can you re-test?) Now only startup and listing trash:/ should scan for trash dirs on all disks. CCBUG: 95654 M +14 -5 trashimpl.cpp 1.32 --- kdebase/kioslave/trash/trashimpl.cpp #1.31:1.32 @@ -500,4 +500,5 @@ void TrashImpl::emptyTrash() { kdDebug() << k_funcinfo << endl; + if ( !m_trashDirectoriesScanned ) scanTrashDirectories(); // For each known trash directory... @@ -518,5 +519,8 @@ void TrashImpl::emptyTrash() TrashImpl::TrashedFileInfoList TrashImpl::list() { + // Here we scan for trash directories unconditionally. This allows + // noticing plugged-in [e.g. removeable] devices, or new mounts etc. scanTrashDirectories(); + TrashedFileInfoList lst; // For each known trash directory... @@ -620,4 +624,5 @@ bool TrashImpl::isEmpty() const { // For each known trash directory... + if ( !m_trashDirectoriesScanned ) scanTrashDirectories(); TrashDirMap::const_iterator it = m_trashDirectories.begin(); @@ -684,4 +689,7 @@ int TrashImpl::findTrashDirectory( const return id; // new trash dir found, register it + // but we need stability in the trash IDs, so that restoring or asking + // for properties works even kio_trash gets killed because idle. +#if 0 kdDebug() << k_funcinfo << "found " << trashDir << endl; m_trashDirectories.insert( ++m_lastId, trashDir ); @@ -690,8 +698,9 @@ int TrashImpl::findTrashDirectory( const m_topDirectories.insert( m_lastId, mountPoint ); return m_lastId; +#endif + scanTrashDirectories(); + return idForTrashDirectory( trashDir ); } -// Maybe we could cache the result of this method. -// OTOH we would then fail to notice plugged-in removeable devices... void TrashImpl::scanTrashDirectories() const { @@ -709,7 +718,7 @@ void TrashImpl::scanTrashDirectories() c int trashId = idForTrashDirectory( trashDir ); if ( trashId == -1 ) { - kdDebug() << k_funcinfo << "found " << trashDir << endl; // new trash dir found, register it m_trashDirectories.insert( ++m_lastId, trashDir ); + kdDebug() << k_funcinfo << "found " << trashDir << " gave it id " << m_lastId << endl; if ( !topdir.endsWith( "/" ) ) topdir += '/';
On Tuesday 18 January 2005 11:36, David Faure wrote: > A bit more caching of the trash dirs too, might help 95654 (can you > re-test?) Sorry, I can currently not re-test, my second hard disk does not work anymore. Please be patient until I've fixed the problem.
On Tuesday 18 January 2005 11:36, David Faure wrote: > A bit more caching of the trash dirs too, might help 95654 (can you > re-test?) Now only startup and listing trash:/ should scan for trash > dirs on all disks. I just tested with CVS HEAD 02/06/2005 and can not confirm this. My second hard disk is still woken up when I trash a file.
Sorry, the above comment is not entirely accurate. The harddisk is always woken up when trashing a file. However, this is not the case if trash:/ has been visited before. So my suggestion is that when trashing the first file, all caching actions which take place when visiting trash:/ in Konqueror are executed, too. I very rarely visit trash:/, but I trash a lot of files.
*** Bug 102260 has been marked as a duplicate of this bug. ***
I also have this problem, on KDE 3.4.1. Trashing a file spins up my second harddisk that contains rarely used data.
Still the case.
I have a similar problem. I have mounted the hard disk of my digital receiver on /mnt/dreambox. When moving a file to trash or emptying the trash bin wakes up the harddisk of my digital receiver.
*** Bug 117392 has been marked as a duplicate of this bug. ***
Bug 117392 was about the CD-ROM being activated, which is potentially slower than another harddisk. Have a nice day!
Fixed in KDE trunk (ie KDE 4).
*** Bug 136513 has been marked as a duplicate of this bug. ***
*** Bug 158903 has been marked as a duplicate of this bug. ***