Comment 3 for bug 1862799

oriolpont (oriolpont) wrote :

Looking forward, I think that extra condition could be safely removed for anyone, Nautilus users included. The argument count check should be enough. The script works on the arguments passed to it, and it does not use $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS anywhere else. AFAICT, Nautilus has always passed the selected paths as arguments to the scripts. Could anyone confirm this?

Specifically, the only edge case would be that Nautilus somehow invokes the script with no selection yet with some (presumably invalid) argument. In that case, the script would fail with "invalid files" message instead of "no files selected", which is arguably better for an unanticipated setting: The latter incites the user to keep trying.