diff --git a/snapcraft/wrappers/editor b/snapcraft/wrappers/editor index aa30a4b44..825b41e7b 100755 --- a/snapcraft/wrappers/editor +++ b/snapcraft/wrappers/editor @@ -39,7 +39,7 @@ fi if [ -n "${EDIT_CMD}" ] && [ "${USERNS}" = 1 ]; then exec 9< /tmp/ # Replace "/tmp/" prefix by exec'ed FD 9. - EDIT_PATH_HOST="/proc/self/fd/9/$(echo "${EDIT_PATH}" | cut -d/ -f2)" + EDIT_PATH_HOST="/proc/self/fd/9/$(echo "${EDIT_PATH}" | cut -d/ -f3)" find_and_spawn "${EDIT_CMD}" "${EDIT_PATH_HOST}" fi