From aaae8f4083a3d40b1cd71f7ae414aa5f12125d1b Mon Sep 17 00:00:00 2001 From: Axel Kittenberger Date: Fri, 25 Nov 2016 16:23:19 +0100 Subject: [PATCH] prepending arguments with -- so they can start with a - --- default-direct.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/default-direct.lua b/default-direct.lua index fc637af..1c281cb 100644 --- a/default-direct.lua +++ b/default-direct.lua @@ -62,6 +62,7 @@ direct.action = function(inlet) spawn( event, '/bin/mkdir', + '--', event.targetPath ) else @@ -69,6 +70,7 @@ direct.action = function(inlet) spawn( event, '/bin/cp', + '--', event.sourcePath, event.targetPathdir ) @@ -79,6 +81,7 @@ direct.action = function(inlet) end spawn(event, '/bin/cp', + '--', event.sourcePath, event.targetPathdir ) @@ -99,7 +102,7 @@ direct.action = function(inlet) error('Refusing to erase your harddisk!') end - spawn(event, '/bin/rm', '-rf', tp) + spawn(event, '/bin/rm', '-rf', '--', tp) elseif event.etype == 'Move' then local tp = event.targetPath @@ -109,13 +112,13 @@ direct.action = function(inlet) error('Refusing to erase your harddisk!') end - local command = '/bin/mv "$1" "$2" || /bin/rm -rf "$1"' + local command = '/bin/mv -- "$1" "$2" || /bin/rm -rf -- "$1"' if config.delete ~= true and config.delete ~= 'running' then - command = '/bin/mv "$1" "$2"' + command = '/bin/mv -- "$1" "$2"' end spawnShell(