Bug 495320

Summary: Inscrutable error when backup disk is read-only for some reason
Product: [Applications] kup Reporter: Nate Graham <nate>
Component: generalAssignee: Simon Persson <simon.persson>
Status: REPORTED ---    
Severity: normal CC: thomasschmidt45
Priority: NOR Keywords: usability
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Doesn't handle read-only disk well

Description Nate Graham 2024-10-24 23:15:34 UTC
Created attachment 175204 [details]
Doesn't handle read-only disk well

My backup disk got mounted read-only (don't ask…), and backup plans failed. This would be expected, but it failed to show me a sane error message. I had to look in the log file, and even then, the error message from rsync was cryptic.

As a result, it took me quite a while to figure out what had happened to the disk.

See attached screenshot.
Comment 1 Nate Graham 2024-10-30 16:04:11 UTC
*** Bug 495549 has been marked as a duplicate of this bug. ***
Comment 2 Simon Persson 2024-11-30 18:04:38 UTC
I don't have much time to look at it, but there is this code that is supposed to handle the situation, in planexecutor.cpp:

void PlanExecutor::startBackup()
{
    QFileInfo lInfo(mDestinationPath);
    if (!lInfo.isWritable()) {
        KNotification::event(KNotification::Error,
                             xi18nc("@title:window", "Problem"),
                             xi18nc("notification", "You don't have write permission to backup destination."));
        exitBackupRunningState(false);
        return;
    }

Somebody would need to look into why that test does not detect the situation.