Commit 3c0b2e30 authored by Méven Car's avatar Méven Car Committed by Christoph Cullmann
Browse files

Store diff files in tmp dir and avoid adding tmp files to history

parent edefa277
...@@ -1313,6 +1313,10 @@ void KateMainWindow::addRecentOpenedFile(const QUrl &url) ...@@ -1313,6 +1313,10 @@ void KateMainWindow::addRecentOpenedFile(const QUrl &url)
if (url.isEmpty()) { if (url.isEmpty()) {
return; return;
} }
// skip files in /subltmp
if (url.path().startsWith(QDir::tempPath())) {
return;
}
// to our local list, aka menu // to our local list, aka menu
m_fileOpenRecent->addUrl(url); m_fileOpenRecent->addUrl(url);
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <KMessageBox> #include <KMessageBox>
#include <KProcess> #include <KProcess>
#include <QDir>
#include <QHeaderView> #include <QHeaderView>
#include <QLabel> #include <QLabel>
#include <QPushButton> #include <QPushButton>
...@@ -340,7 +341,7 @@ void KateMwModOnHdDialog::slotPDone() ...@@ -340,7 +341,7 @@ void KateMwModOnHdDialog::slotPDone()
} }
m_diffFile->setAutoRemove(false); m_diffFile->setAutoRemove(false);
QUrl url = QUrl::fromLocalFile(m_diffFile->fileName()); QUrl url = QUrl::fromLocalFile(QDir::tempPath() + "/" + m_diffFile->fileName());
delete m_diffFile; delete m_diffFile;
m_diffFile = nullptr; m_diffFile = nullptr;
......
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