I have stumbled across a strange issue when attempting to delete items from my Google Drive with DO. "Secure Wipe" is enabled under "File Delete Options" and have no issues deleting files anywhere on my local drives, or mapped local network drives. However, if I attempt to delete a file from my Google Drive with Secure Wipe enabled, I get the following Directory Opus error:
"An error occurred deleting "XXXXXXXXXX.TXT": The requested operation cannot be performed on a file with a user-mapped section open. (1224)"
At first I thought it may have been Labels interfering, but after some testing I was able to isolate the issue to the Secure Wipe function. If I disable Secure Wipe I can delete the file without issue.
It means Google Drive (or something; could also be antivirus*) is blocking that kind of access to the file, or currently has the file open so it cannot be written to. Opus is just reporting the error, probably not the cause of it.
(*Ransomware detection will often view secure delete as suspicious, since it’s the same kind of thing a virus that encrypts all your data would do.)
If it’s a very large text file and its open in the viewer pane, try closing the viewer (although you shouldn’t normally have to).
I initially thought so as well, but I do not believe that is the case. I can bring up File Explorer and Directory Opus side-by-side and when the file delete fails with Directory Opus (with Secure Wipe enabled) I am able to immediately delete the file in File Explorer. Also, in subsequent testing, when I attempt to delete the file in DO with Secure Wipe enabled and it fails, I can immediate go into preferences, disable Secure Wipe, then successfully delete the file with DO. Again, this ONLY happens with files that are not on my local drives, or mapped drives on my local network. If necessary I can create a video of this behavior.
I was able to perform a secure delete without issue on the same file using Sysinternals sdelete64.exe. You may need to download the video to get a decent enough resolution to read the text.
The SysInternals tool may do secure delete in another way. Or may be exempt from antivirus which knows about it and knows it isn't ransomware.
At the end of the day, the filesystem is reporting a lock on the file when we try to open it in a certain way. Opening it that way works on other filesystems. Google Drive, or possibly antivirus, is doing something to block the operation, or it just doesn't support the method of file access (it may only support the most common ways of reading/writing data).
You could look at the operations (and what else is accessing the file) using Process Monitor if you wanted to work out exactly what was going on.
(If the drive is a modern SSD then secure erase is probably not useful on it anyway, by the way. And the secure erase definitely won't do anything to the other copies stored in the cloud and on other computers. There's probably no point to using it with files that have been in Google Drive unless it's only used to backup a single machine.)