Bad path passed to script exec'd via .contract context menu item usage
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Files |
Fix Released
|
High
|
Jeremy Wootten |
Bug Description
While playing around with .contract files in Luna I ran into what I *think* is a bug in
either Contractor or Files, or perhaps with how they communicate info between each other.
I created a ~/.local/
[Contractor Entry]
Name=myscript
Icon=pantheon-files
Description=Do something to the selected entry(s)
MimeType=
Exec=myscript.sh %f
Gettext-
myscript.sh is in ~/bin, and contains the following lines of interest:
nsm=$(echo -e "\$1:\t\
notify-send "myscript.sh" "$nsm"
When I do the following within Files, $1 shows up as NOT the path I expected it to be:
1) Open Files and browse to a known folder
2) Right click on Pictures and open it in a new tab
3) Tab switch back to the known folder tab
4) Right click somewhere in the folder's empty area and select the myscript menu item
5) What I see in the notify message is the path to the Pictures folder, not the path
to the known folder
Continuing like this by opening up more folders, the path of the last opened folder is
what always gets passed to the script when changing folders via tab switching.
The path passed to the script is corrected as soon as a different folder is browsed to.
Related branches
- elementary Apps team: Pending requested
-
Diff: 15 lines (+3/-2)1 file modifiedsrc/View/AbstractDirectoryView.vala (+3/-2)
Changed in pantheon-files: | |
importance: | Undecided → High |
Changed in pantheon-files: | |
status: | New → Confirmed |
Changed in pantheon-files: | |
status: | Confirmed → In Progress |
Changed in pantheon-files: | |
status: | In Progress → Fix Committed |
Changed in pantheon-files: | |
milestone: | juno-beta1 → 0.3.0.5 |
status: | Fix Committed → Fix Released |
I have also confirmed this bug