How to prevent a button to accept a drop?

A small issue, probably a little bug. Nothing urgent.

I use certain buttons to go to important folders, via a Go command. For instance:
Go C:\Downloads

I know I can use favorites to do this too, but I wanted to do something more with those buttons later.

But when I accidentally dropped a file on this button, I discovered that the file was moved from my 'current' folder to that particular location (in this case: to the Downloads folder). That doesn't look like the normal behaviour for a 'Go' command - and if it does, I would still like to know if there is a normal way to prevent accepting a drop.

I solved it as follows, for now:

@ifsel:files
Go
@ifsel:dirs
Go
@ifsel:else
Go C:\Downloads

It seems to prevent the drop error. Just a bit of strange behaviour (if I drop a file on the button, my current location does not change; if I drop a folder on it, the location changes to the Downloads folder; strange, but that's okay for me).

Is this behaviour conform to what must be expected?

That's by design, not a bug.

We could add a way to suppress it if you need one, although this should also work around it:

dopusrt /cmd:active Go C:\
1 Like

@Leo
I would never ask a code change or addition for something solved so easily. I can also see why it isn't a bug per se. I just think it is somewhat misleading / unexpected that a "Go" statement manages to move files. I was certainly surprised, because the button next to this one was meant to open the file. If I had not been attentive, being distracted by something else for instance, that file would have been 'disappeared'. You know, Leo, the problem with such things is that when a file gets out of sight, you do not always notice it right away and ultimately it might be 'lost' on a big file system.

So ultimately, if it isn't a bug, it could be called a potential show stopper. I you would do anything, I wouldn't add 'a way to suppress' it, as you suggested, but rather make it NOT happen by default (or display a notification message), and add a way to make it happen IF the user desires so.

For me this is a closed case. Thanks for your suggestion, it works fine.

I see here a more general need for the internal command Nope.

Set NOOP exists for that (although it will abort the rest of the button, so it’s not always suitable).

Maybe a new modifier like @nodropallowed or similar would come handy.

Also, if you add a label hinting that a Go command will take place, I guess you’d stop dropping files there by habit.

On yes...
Noop would be better name for the command than Nope. :slightly_smiling_face: