From 29b2e02a9163064a06afbf0c835a1a459eaa8d83 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Thu, 27 Dec 2012 18:28:04 +0000 Subject: [PATCH] (trunk, qt) #5195 'Qt: open folder: single file in folder' -- fixed with patch from basinilya --- qt/mainwin.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qt/mainwin.cc b/qt/mainwin.cc index 992a17159..529d3a373 100644 --- a/qt/mainwin.cc +++ b/qt/mainwin.cc @@ -648,8 +648,7 @@ TrMainWindow :: openFolder( ) const FileList files = tor->files(); const QString firstfile = files.at(0).filename; int slashIndex = firstfile.indexOf('/'); - if (files.size() > 1) - { + if (slashIndex > -1) { path = path + "/" + firstfile.left(slashIndex); } #ifdef HAVE_OPEN_SELECT -- 2.40.0