--- a/src/gui/dialogs/qfilesystemmodel.cpp Wed Apr 21 12:15:23 2010 +0300
+++ b/src/gui/dialogs/qfilesystemmodel.cpp Wed Apr 21 20:15:53 2010 +0300
@@ -1361,6 +1361,16 @@
if (!showDrives && !newPathDir.exists())
return d->index(rootPath());
+ //We remove the watcher on the previous path
+ if (!rootPath().isEmpty() && rootPath() != QLatin1String(".")) {
+ //This remove the watcher for the old rootPath
+ d->fileInfoGatherer.removePath(rootPath());
+ //This line "marks" the node as dirty, so the next fetchMore
+ //call on the path will ask the gatherer to install a watcher again
+ //But it doesn't re-fetch everything
+ d->node(rootPath())->populatedChildren = false;
+ }
+
// We have a new valid root path
d->rootDir = newPathDir;
QModelIndex newRootIndex;