Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ADD: Elevation delete to trash#878

Open
avmaksimov wants to merge 7 commits intodoublecmd:masterdoublecmd/doublecmd:masterfrom
avmaksimov:elevation-delete-to-trashavmaksimov/doublecmd:elevation-delete-to-trashCopy head branch name to clipboard
Open

ADD: Elevation delete to trash#878
avmaksimov wants to merge 7 commits intodoublecmd:masterdoublecmd/doublecmd:masterfrom
avmaksimov:elevation-delete-to-trashavmaksimov/doublecmd:elevation-delete-to-trashCopy head branch name to clipboard

Conversation

@avmaksimov
Copy link
Contributor

It tested in Windows 10 and Ubuntu 22.04. I had to separate some functions to uURIHandling and other changes for Linux.

Also I changed default behavior for Windows: it allow to trash only if a registry value equal some value and default not - it's right for network drives for example.

Also I want to add checking on Windows for size of removing files. Because DC could show information about impossibility to trash files more than max size for trash on this disk.

Also I did some refactoring to better adding new elevation action.
But this version tested only in Windows. The question is about GetLastError
Tested on Ubuntu 22.04
Windows can trash file only if there are right value in registry. So it is not right to show to trash by default (for example for network drives).
@avmaksimov avmaksimov marked this pull request as ready for review March 19, 2023 14:44
@avmaksimov
Copy link
Contributor Author

Unfortunately I found some small mistakes and have to fix it.

@avmaksimov
Copy link
Contributor Author

I hope that's all. But it's needed to do some work with checking file or folder before deleting in Windows for max file size. So please check it.

And also I suggest to do this checking in TFileSystemDeleteOperation.ProcessFile . Do you agree? mbCheckTrash checks only for drive.

About optimization:
1) bytes isn't being shown;
2) there is no need to UpdateStatistics two times: before and after.

And is really necessary to use CriticalSection? I don't think so because this critical section is being made every times and isn't global.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.