Show "Confirm Delete" dialog for files, too

For #8651 and #10190