Skip to content

Action Standard token %F not working with multiple files and file names and directories with white spaces #2739

@christoph-petzold

Description

@christoph-petzold
 * Nemo version (nemo --version 4.4.2)
 * Is issue with desktop or windowed nemo?
 * Distribution - (Ubuntu 20.04.2 LTS)
 * 64 bit

Issue
If you create an action for the use with multiple files and the files or the foulder contain white spaces you cannot use %F to iterate over the file paths.

Steps to reproduce

  1. Create an action:

[Nemo Action]
Active=true
Name=Test
Comment=
Exec=/opt/test.sh %F
Icon-Name=emblem-videos
Selection=notnone
Extensions=any
Terminal=true

  1. Create file hierarchy:
    mkdir /opt/test folder

/opt/test folder/test 1.txt
/opt/test folder/test 2.txt

  1. Create /opt/test.sh

#!/bin/bash
#echo "Test";
#IFS=$(echo -en "\n\b");

var="$@";
vars=( $var );

for uri in "${vars[@]}";
do
printf "$uri";
printf "\n";
done;

sleep 5;

  1. Open nemo, go to /opt/test folder/, Mark both files "test 1.txt" and "test 2.txt", right klick one file and then left click context menu 'Test' action

Result

/opt/test
folder/test
1.txt
/opt/test
folder/test
2.txt

Expected behaviour

/opt/test folder/test 1.txt
/opt/test folder/test 2.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions