diff --git a/atom/common/platform_util_linux.cc b/atom/common/platform_util_linux.cc index 8fad8609342a..7789bdb00656 100644 --- a/atom/common/platform_util_linux.cc +++ b/atom/common/platform_util_linux.cc @@ -15,7 +15,7 @@ #include "url/gurl.h" #define ELECTRON_TRASH "ELECTRON_TRASH" -#define ELECTRON_DEFAULT_TRASH "gvfs-trash" +#define ELECTRON_DEFAULT_TRASH "gio" namespace { @@ -126,12 +126,13 @@ bool MoveItemToTrash(const base::FilePath& full_path) { } else if (trash.compare("trash-cli") == 0) { argv.push_back("trash-put"); argv.push_back(full_path.value()); - } else if (trash.compare("gio") == 0) { - argv.push_back("gio"); - argv.push_back("trash"); + } else if (trash.compare("gvfs-trash") == 0) { + // retain support for deprecated gvfs-trash + argv.push_back("gvfs-trash"); argv.push_back(full_path.value()); } else { argv.push_back(ELECTRON_DEFAULT_TRASH); + argv.push_back("trash"); argv.push_back(full_path.value()); } return XDGUtilV(argv, true); diff --git a/docs/api/environment-variables.md b/docs/api/environment-variables.md index 72f75e6b8165..9fdc0507ce83 100644 --- a/docs/api/environment-variables.md +++ b/docs/api/environment-variables.md @@ -58,6 +58,16 @@ Don't attach to the current console session. Don't use the global menu bar on Linux. +### `ELECTRON_TRASH` _Linux_ + +Set the trash implementation on Linux. Default is `gio`. + +Options: +* `gvfs-trash` +* `trash-cli` +* `kioclient5` +* `kioclient` + ## Development Variables The following environment variables are intended primarily for development and