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

CacheWriter errors go unnoticed much too easily #86

Closed
Code7R opened this issue Oct 19, 2018 · 3 comments
Closed

CacheWriter errors go unnoticed much too easily #86

Code7R opened this issue Oct 19, 2018 · 3 comments

Comments

@Code7R
Copy link

Code7R commented Oct 19, 2018

Failure to write cache is not reported

Just what the title says. If the target directory is not writable then gzopen returns NULL and this information is only going to the log. The user never gets informed about the problem.

Not sure how you would like to make it reported, the stack trace is pretty clear but using plain QMessageBox looks alien in the rest of the application.

bool CacheWriter::writeCache( const QString & fileName, DirTree *tree )
{
if ( ! tree || ! tree->root() )
return false;

gzFile cache = gzopen( (const char *) fileName.toUtf8(), "w" );

if ( cache == 0 )
{
logError() << "Can't open " << fileName << ": " << formatErrno() << endl;
return false;
}
@shundhammer shundhammer changed the title Failure to write cache is not reported QDirStat-internal cache writer does not post an error popup upon write failure, only to the log Oct 19, 2018
@shundhammer
Copy link
Owner

I'll have a look at that.

@shundhammer
Copy link
Owner

I just saw: It is reported, but only to the status line, and that's a very short-lived notification - in particular when you happen to move the mouse over the treemap which causes a gazillion changes to the status line just hovering over treemap tiles.

I had added that latter feature only very reluctantly because some user kept nagging. I should not have given in to that; not only does that make this kind of message disappear in a heartbeat, it also leads to users getting so used to stuff always flickering in the status line that nobody pays attention to it anymore.

@shundhammer shundhammer changed the title QDirStat-internal cache writer does not post an error popup upon write failure, only to the log CacheWriter errors go unnoticed much too easily Oct 19, 2018
@shundhammer
Copy link
Owner

Now posting an error popup.

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

No branches or pull requests

2 participants