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

Validate path before opening it #205

Merged
merged 1 commit into from
Jan 18, 2019
Merged

Validate path before opening it #205

merged 1 commit into from
Jan 18, 2019

Conversation

marusak
Copy link
Collaborator

@marusak marusak commented Jan 17, 2019

It can happen that displayed problems gets removed outside of the
gnome-abrt and then when we try to open problem directory we end up with
crash.

Fixes #1544907

Signed-off-by: Matej Marusak mmarusak@redhat.com

It can happen that displayed problems gets removed outside of the
gnome-abrt and then when we try to open problem directory we end up with
crash.

Fixes #1544907

Signed-off-by: Matej Marusak <mmarusak@redhat.com>
@ernestask
Copy link
Collaborator

Would be nice to have some sort of feedback about the directory being missing in that case.

@marusak
Copy link
Collaborator Author

marusak commented Jan 17, 2019

Agree. However showing "Directory does not exists" will just open more questions. We can try to explain it in detail what could happen. Looking for suggestions :)

@ernestask
Copy link
Collaborator

“This problem has been deleted using another tool and its directory no longer exists” or a variation of that, maybe? Of course, the problem should be removed from the interface as well.

@ernestask
Copy link
Collaborator

I think the most important parts are:

  • explaining what happened (problem was removed)
  • explaining how it happened (some different tool was used)
  • explaining how it makes the action fail (directory no longer exists)

@ernestask
Copy link
Collaborator

Disappearing UI elements can be disorienting, but it prevents failures like this. If we had some sort of monitoring of the problem directories, then we could do it ahead of time, but then we would also need to add notifications or something else that would also explain how it is possible.

However, it’s rather an edge case, no?

@marusak
Copy link
Collaborator Author

marusak commented Jan 17, 2019

This problem has been deleted using another tool and its directory no longer exists

This will bring questions like "I don't use any other tool". We should mention deduplication or that it was removed by someone.

Disappearing UI elements can be disorienting, but it prevents failures like this. If we had some sort of monitoring of the problem directories, then we could do it ahead of time, but then we would also need to add notifications or something else that would also explain how it is possible.

I don't think that removing UI elements is the solution. The solution would be to keep it there, but validate that it exists and if not make it gray or write there in red something like "invalid" and provide explanation when you click on it.

However, it’s rather an edge case, no?

Yes, it is very edge. That's why I found it sufficient not to crash. Of course it would be nicer if it would inform user what is happening etc. but for those few cases when it happens it usually is just fine. But if you have some good idea how to do it in a friendly way, do not hesitate :)

@ernestask
Copy link
Collaborator

This will bring questions like "I don't use any other tool". We should mention deduplication or that it was removed by someone.

And I was thinking that the “someone” could also be a bit surprising.

I don't think that removing UI elements is the solution. The solution would be to keep it there, but validate that it exists and if not make it gray or write there in red something like "invalid" and provide explanation when you click on it.

That’s not a bad idea at all, actually.

Yes, it is very edge. That's why I found it sufficient not to crash. Of course it would be nicer if it would inform user what is happening etc. but for those few cases when it happens it usually is just fine. But if you have some good idea how to do it in a friendly way, do not hesitate :)

I’m going to agree, but let’s open a new issue about this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants