Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: qtfm don't show remove dialog confirmation for symbolic link #146

Open
ferion11 opened this issue Jul 14, 2019 · 7 comments
Open

Bug: qtfm don't show remove dialog confirmation for symbolic link #146

ferion11 opened this issue Jul 14, 2019 · 7 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ferion11
Copy link

Bug: qtfm don't show remove dialog confirmation for symbolic link.

@ferion11
Copy link
Author

If, in your selection of many files, there is symbolic links between normal files, and you press Delete key, it will show the remove dialog confirmation, but it will remove all symbolic links without confirmation first. And if you move a symbolic link, qtfm make a copy.

@rodlie
Copy link
Owner

rodlie commented Jul 16, 2019

This is on master (6.3)? I replaced the copy/move function in master and I might have overlooked something. Will check, I'm occupied for a couple of days, but will then dedicated a day to qtfm :)

@ferion11
Copy link
Author

Yes, is in master (6.3). It isn't a big problem for me, but is better to fix before release the 6.3 version. Take your time :)

@rodlie rodlie added this to the 6.3.0 milestone Jul 16, 2019
@rodlie rodlie added the bug Something isn't working label Jul 16, 2019
@rodlie rodlie self-assigned this Jul 16, 2019
@rodlie
Copy link
Owner

rodlie commented Jul 16, 2019

Will of course be fixed before release :)

@ferion11
Copy link
Author

We have some suspicious code here:

// Delete selected file(s)
for (int i = 0; i < selList.count(); ++i) {
QFileInfo file(modelList->filePath(selList.at(i)));
if (file.isWritable()) {
if (file.isSymLink()) {
ok = QFile::remove(file.filePath());
} else {
if (yesToAll == false) {
if (confirm) {
QString title = tr("Careful");
QString msg = tr("Are you sure you want to delete <p><b>\"") +
file.filePath() + "</b>?";
int ret = QMessageBox::information(this, title, msg,
QMessageBox::Yes | QMessageBox::No | QMessageBox::YesToAll);
if (ret == QMessageBox::YesToAll) yesToAll = true;
if (ret == QMessageBox::No) return;
}
}
ok = modelList->remove(selList.at(i));
}
} else if (file.isSymLink()) {
ok = QFile::remove(file.filePath());
}
}

@ferion11
Copy link
Author

There is also the fact that broken symbolic links don't show in qtfm (master 6.3). But I will see the move thing first.

@ferion11
Copy link
Author

The #148 fix the broken symbolic link thing. Now, for this bug report, the only thing that I remember is the move symbolic link action that don't remove the original.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants