Fix path display in folder wizard

The new implementation did not work correctly when owncloud is installed
in a subdirectory.
This commit is contained in:
Daniel Molkentin 2013-08-05 14:28:05 +02:00
parent b680540adf
commit 99dea76fd1

View file

@ -210,8 +210,10 @@ void FolderWizardTargetPage::slotUpdateDirectories(QStringList list)
_ui.folderListWidget->clear();
QFileIconProvider prov;
QIcon folderIcon = prov.icon(QFileIconProvider::Folder);
QString webdavFolder = QUrl(ownCloudInfo::instance()->webdavUrl()).path();
foreach (QString path, list) {
path.remove(QLatin1String("/remote.php/webdav"));
path.remove(webdavFolder);
if (!path.startsWith("/")) path.prepend('/');
new QListWidgetItem(folderIcon, path, _ui.folderListWidget);
}
}