Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1842 closed defect (fixed)

Journal does not provide any error message on write errors

Reported by: bernie Owned by: alsroot
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: journal Version: 0.84.x
Severity: Unspecified Keywords: journal, sugar-love, dev-love, r+
Cc: aa, anishmangal2002@…, erikos Distribution/OS: Unspecified
Bug Status: Resolved

Description

If you try to copy a file to a device which is write protected, you get no error messages, but of course the write fails.

You probably don't get errors also in other cases, such as disk full,

I/O error, etc.

Tested with sugar-datastore 0.84.1 and sugar 0.84.11.

Attachments (2)

0001-Journal-Provide-error-message-on-write-errors-1842.patch (7.1 KB) - added by erikos 9 years ago.
Patch against 0.84: add functionality to detail view, better error message
0001-Journal-Error-alert-when-copying-to-devices-in-the.patch (4.9 KB) - added by erikos 9 years ago.
Journal: Error alert when copying to devices in the detail view, Includes better error messages.

Download all attachments as: .zip

Change History (21)

comment:1 Changed 9 years ago by aa

  • Cc aa added

comment:2 Changed 9 years ago by bernie

  • Keywords sugar-love added
  • Summary changed from Journal does not provide any error message on write errors (0.84) to Journal does not provide any error message on write errors

comment:3 Changed 9 years ago by mchua

  • Keywords dev-love added

comment:4 Changed 9 years ago by aa

  • Cc anishmangal2002@… added

I just closed #1416 as a dup of this bug.

The following test cases are from that bug (by alsroot), and may be useful to those working on this one:

|TestCase|

  • drag any not file-less object from Journal to RO mounted volume
  • shells logs errors(but suppressing these errors means nothing for user) and keeps silent

|TestCase|

  • drag any file-less object from Journal to RW mounted volume
  • shells logs errors(but suppressing these errors means nothing for user) and keeps silent

comment:5 Changed 9 years ago by bernie

  • Keywords r? added

comment:6 Changed 9 years ago by erikos

  • Owner changed from sayamindu to alsroot
  • Status changed from new to assigned

comment:7 Changed 9 years ago by alsroot

  • Bug Status changed from Unconfirmed to Needinfo

Patch uses NotifyRedAlert but it is not part of sugar-toolkit i.e. code won't work, what about just NotifyAlert and switch to red one later?

Also, patch uses _('Alert') for alert title, could be not so informative :), what about just "Disk storage error"?

volumestoolbar.py emits volume-error signal with error text taken from exception, not sure if it is a good idea to pass it directly to user visible message?

any ideas?

comment:8 Changed 9 years ago by tomeu

  • Component changed from sugar to journal

comment:10 Changed 9 years ago by bernie

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:11 Changed 9 years ago by erikos

  • Resolution fixed deleted
  • Status changed from closed to reopened

This has not been pushed yet, dependent on #2140.

comment:12 Changed 9 years ago by erikos

I think the idea is to land this in 0.84, too (Bernie, a request from the field I suppose?). The master patch does depend on new API in sugar-toolkit, the 0.84 should just create the Alert inside the patch.

comment:13 Changed 9 years ago by erikos

  • Cc erikos added

comment:15 Changed 9 years ago by erikos

  • Resolution set to fixed
  • Status changed from reopened to closed

I opened a downstream ticket for the 0.84 back port: http://dev.laptop.org/ticket/10312

comment:16 Changed 9 years ago by erikos

  • Resolution fixed deleted
  • Status changed from closed to reopened

There are two little isues with this patch:

a) The string for the permision etc error is not really helpful to the user: sself.emit('volume-error', _('Input/Output error'), _('Error')) even "Error while copying" as the log string suggests would be better - other suggestions welcome :)

b) We only handle the case when we drag a file to a device. In the detail view you can copy files as well to devices: journaltoolbox.py

def _copy_menu_item_activate_cb(self, menu_item, mount):
        model.copy(self._metadata, mount.get_root().get_path())

I will have a look at how complicated it is to handle that case, too.

Changed 9 years ago by erikos

Patch against 0.84: add functionality to detail view, better error message

comment:17 Changed 9 years ago by erikos

  • Keywords r? added; r+ removed

Changed 9 years ago by erikos

Journal: Error alert when copying to devices in the detail view, Includes better error messages.

comment:18 Changed 9 years ago by erikos

  • Keywords r+ added; r? removed
  • Resolution set to fixed
  • Status changed from reopened to closed

comment:19 Changed 9 years ago by m_anish

  • Bug Status changed from Needinfo to Resolved

Thanks for improving this fix.

Note: See TracTickets for help on using tickets.