Delete to recycle bin with BoxCryptor

I have my OneDrive folder on a 2TB USB SSD. I use BoxCryptor to encrypt some of the folders. BoxCryptor uses a virtual drive, X: in my case, to do its work.

If I delete a file from the actual D: drive the file goes to the Recycle Bin. If I delete a file from the logical X: drive the file is simply deleted with no chance of recovery.

The documentation references floppy and network drives as excluded from the Recycle Bin. Is it safe to assume that logical drives are excluded as well?

Thanks.

What happens in File Explorer? It's probably skipping the Recycle Bin at the OS level and not something Opus is doing.

Explorer sends the file to the Recycle Bin from the physical drive (D:) and does not from the logical drive (X:). The messages are fairly clear in this regard.

Physical ScreenClip

Logical ScreenClip

DOpus may be misleading in the logical drive delete. The same message is presented when deleting from either the physical or logical drive. Only the physical makes it to the recycle bin.

Both ScreenClip

Hope this helps.

Opus is asking the Recycle Bin to delete the files, which we can tell from the prompt it's showing. (If Opus itself is going to delete the files outright, it will show a different prompt that doesn't mention the Recycle Bin.)

What the Recycle Bin then does with the files is completely up to it (i.e. up to Windows), and in this case it seems it's deleting the files outright. I would expect it to show some kind of confirmation first if it does that, like it does when asked to process files which too large for the Recycle Bin, but I don't think it's something we have control over in any case (beyond the flag mentioned below, which we already set). We're asking the Recycle Bin to delete the files and it's apparently choosing to do something unusual (and unpredictable).

When we call the Recycle Bin API, we specify FOF_WANTNUKEWARNING, which is documented as:

Send a warning if a file is being permanently destroyed during a delete operation rather than recycled. This flag partially overrides FOF_NOCONFIRMATION .

So if no warning is being displayed, and the file is being permanently deleted, then that is a bug in Windows (or possibly BoxCryptor, if it's involved in some way).

Okay, Well there may be a clue in the logical drive confirm message, it asks about a permanent delete. May be less a bug than an intended action, for whatever reason I am not sure.

I can delete from the physical to preserve a recover, just have to remember. DOpus might consider modifying the message for logical deletes if at all possible as it masks the action which is about to happen. May be too much of a fringe case though. Thanks for the quick feedback.

There isn't really anything special about "logical" drives. All drive letters are a logical drive of one type or another.

There may be something else that sets BoxCryptor drives apart from normal ones but for us to show a different delete confirmation for it it'd need to be true of all drives where that property was true. It would also be subject to change if Windows ever fixed their bug, and then we'd be showing the wrong confirmation message in the future, or with different device types.

You could change your Delete buttons and hotkeys to add NORECYCLE to the command when the current path is on that drive.

BoxCryptor also has some settings that may change how things work:

  • Enable recycle bin : Deleting files will move them to trash, so that they can be restored if necessary.
  • Mount as fixed drive : Even though the Boxcryptor drive is a virtual drive, this option will make it look and treated as a real drive.

Possibly the Mount as fixed drive option may be what's causing this, because if Opus thinks it's a normal fixed hard drive it will assume the recycle bin is supported and show the recycle bin version of the confirmation message. Turning that option off in BoxCryptor may solve it.

Can't check Enable recycle bin as this grays out Mount for all Users and Mount in Windows Mount Manager. These two are needed in order for Windows Search Index to work.

Checking Mount as fixed drive has no impact. File is permanently deleted.

Thanks for the effort, I will just go to plan B, either create a destination folder of my own for deletes or delete from the physical drive. Not that big a deal as deletes shouldn't be too common an occurence. :man_shrugging:

Presumably there's a reason they can't support that combination of settings, but you'd have to ask them for details as I don't know enough about how their software works.

Other than which confirmation dialog is shown, the actual behaviour is the same in Explorer and Opus, and the limitation of when the Recycle Bin can be used is coming from the OS or BoxCryptor.

Filed a ticket with BoxCryptor re logical vs physical delete and the Recycle Bin. Thanks.

Found the solution to this, my attention to detail. It turns out the options are checked beneath the gray, though hard to discern. It appears that Enable recycle bin force checks the other three and that is the way it is going to be.

Gave it a go yesterday by checking recycle. It seems to be working fine. Just closing the loop and sorry for the oversight.

1 Like