Run scripts in their place when they are on disk

* We only write the pytmp/script.py for unsaved scripts, so they can be
  recovered.
This commit is contained in:
baldurk
2026-08-13 21:05:14 +01:00
parent e7f0aac008
commit 810e6a79d2
2 changed files with 21 additions and 14 deletions
+1 -13
View File
@@ -2381,19 +2381,7 @@ void PythonContext::LaunchDebugger(QWidget *window, PersistentConfig &config, QS
return;
if(context_location.isEmpty())
{
for(QString path : QStandardPaths::standardLocations(QStandardPaths::AppDataLocation))
{
QDir tmpDir(path);
tmpDir.mkpath(lit("pytmp"));
tmpDir.cd(lit("pytmp"));
if(tmpDir.exists())
{
context_location = tmpDir.absolutePath();
break;
}
}
}
return;
// don't overwrite an existing file, to allow user customisation
QDir context_dir(context_location);