Skip to content

shell-rs: copy current URI in drop callback before looping over dropped files

The current URI needs to be copied before the comparison, because otherwise the file borrowing is still alive when open_uri is called, and that method alters the open file.

The current URI is either None, and if so changes to the first file's URI in the drop data, or a wrapped URI, and then not changed, because the file is opened in a different window.

For the first case, we need to copy the URI inside the loop, unless we want to test if there are more than one files dropped.

Closes: #240 (closed)

Edited by Markus Göllnitz

Merge request reports