[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 271824] Dolphin runs scripts in a wrong working directory
From:       Frank Reininghaus <frank78ac () googlemail ! com>
Date:       2011-05-28 12:56:17
Message-ID: 20110528125617.E111E88573 () immanuel ! kde ! org
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=271824


Frank Reininghaus <frank78ac@googlemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |investigated
                 CC|                            |faure@kde.org




--- Comment #3 from Frank Reininghaus <frank78ac googlemail com>  2011-05-28 14:56:16 ---
The place in Dolphin where the script gets launched is in
DolphinViewContainer::slotItemTriggered(const KFileItem& item); that function
calls 'item.run()'. Then KFileItem::run(...) uses KRun to execute the script,
where the working directory is set to KGlobalSettings::documentPath() in
KRun::runCommand(...).

It seems that this was done intentionally (see bug 108510). It might be
desirable to set the working directory to 'Documents' in some cases, but IMHO
not for shell (or Perl/Python/...) scripts launched from Dolphin.

One possibility to resolve this would be to implement overloaded functions
KFileItem::run(...) and KRun::KRun(...) that allow to pass the working
directory from DolphinViewContainer.

@David: Do you have a better idea how to resolve this issue?

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic