Commit 4a8cbc61 authored by Michael Reeves's avatar Michael Reeves

Don't append to already complete url

parent 5c3ea7c4
...@@ -63,7 +63,6 @@ void FileAccess::reset() ...@@ -63,7 +63,6 @@ void FileAccess::reset()
m_linkTarget = ""; m_linkTarget = "";
//m_fileType = -1; //m_fileType = -1;
m_pParent = nullptr;
tmpFile.clear(); tmpFile.clear();
tmpFile = QSharedPointer<QTemporaryFile>::create(); tmpFile = QSharedPointer<QTemporaryFile>::create();
realFile = nullptr; realFile = nullptr;
...@@ -102,6 +101,7 @@ void FileAccess::setFile(const QString& name, bool bWantToWrite) ...@@ -102,6 +101,7 @@ void FileAccess::setFile(const QString& name, bool bWantToWrite)
void FileAccess::setFile(const QUrl& url, bool bWantToWrite) void FileAccess::setFile(const QUrl& url, bool bWantToWrite)
{ {
reset(); reset();
Q_ASSERT(parent() == nullptr || url != parent()->url());
m_url = url; m_url = url;
//QUrl::isLocalFile assumes the scheme is set. //QUrl::isLocalFile assumes the scheme is set.
...@@ -1208,7 +1208,8 @@ void FileAccessJobHandler::slotListDirProcessNewEntries(KIO::Job*, const KIO::UD ...@@ -1208,7 +1208,8 @@ void FileAccessJobHandler::slotListDirProcessNewEntries(KIO::Job*, const KIO::UD
//must be manually filtered KDE does not supply API for ignoring these. //must be manually filtered KDE does not supply API for ignoring these.
if(fa.fileName() != "." && fa.fileName() != "..") if(fa.fileName() != "." && fa.fileName() != "..")
{ {
fa.addPath(fa.fileName()); //quick fix to preserve behavoir without creating invalid urls. TODO: look for altertive machanism for use with next major release.
fa.setFile(fa.url());
m_pDirList->push_back(fa); m_pDirList->push_back(fa);
} }
......
...@@ -118,7 +118,7 @@ class FileAccess ...@@ -118,7 +118,7 @@ class FileAccess
bool m_bValidData; bool m_bValidData;
//long m_fileType; // for testing only //long m_fileType; // for testing only
FileAccess* m_pParent; FileAccess* m_pParent = nullptr;
QDir m_baseDir; QDir m_baseDir;
QFileInfo m_fileInfo; QFileInfo m_fileInfo;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment