8000 fix: use gio as default linux trash impl by codebytere · Pull Request #15399 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: use gio as default linux trash impl #15399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions atom/common/platform_util_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "url/gurl.h"

#define ELECTRON_TRASH "ELECTRON_TRASH"
#define ELECTRON_DEFAULT_TRASH "gvfs-trash"
#define ELECTRON_DEFAULT_TRASH "gio"

namespace {

Expand Down Expand Up @@ -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);
Expand Down
10 changes: 10 additions & 0 deletions docs/api/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,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`

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

## Development Variables

The following environment variables are intended primarily for development and
Expand Down
0