Bug 36415

Summary: working directory for actions
Product: quanta Reporter: Roland Seuhs <roland>
Component: generalAssignee: András Manţia <amantia>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 2.0.1   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Roland Seuhs 2001-12-23 13:44:05 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           quanta
Version:           2.0.1 (using KDE 2.2.2 )
Severity:          normal
Installed from:    SuSE
Compiler:          gcc version 2.95.3 20010315 (SuSE)
OS:                Linux (i686) release 2.4.10-4GB
OS/Compiler notes: 

When you use scripting in the "Actions configurations" tool and then start a script the script sees the user's home directory as working directory but obviously it should see the project directory as working directory.

I consider this a bug and not a wishlist item because if you create files with scripting the files will go into the homedirectory and will be overwritten when you start the script from another project.



(Submitted via bugs.kde.org)
(Called from KBugReport dialog)
Comment 1 András Manţia 2003-05-10 12:54:12 UTC
Subject: quanta/quanta/toolbar

CVS commit by amantia: 

Use the project base directory as the working directory for script actions.
Fixes #36415. Wondering, why I haven't fixed it before...

CCMAIL: 36415-done@bugs.kde.org


  M +2 -1      tagaction.cpp   1.44


--- quanta/quanta/toolbar/tagaction.cpp  #1.43:1.44
@@ -139,5 +139,6 @@ void TagAction::insertTag(bool inputFrom
   {
     KProcess *proc = new KProcess();
-    proc ->clearArguments();
+    proc->clearArguments();
+    proc->setWorkingDirectory(quantaApp->projectBaseURL().path());
 
     QDomElement script = tag.namedItem("script").toElement();