Ticket #6557 (new defect)

Opened 6 years ago

Last modified 6 years ago

sugar.activity.activity.Activity.save() buggy

Reported by: homunq Owned by: homunq
Priority: normal Milestone: 9.1.0-cancelled
Component: sugar Version: Development build as of this date
Keywords: Cc: homunq, marco, tomeu
Action Needed: code Verified: no
Deployments affected: Blocked By:
Blocking: #4365

Description

If I open without a dsobject, and creat_jobject is false, self._jobject gets set to None. But then save nonchalantly does:

self.write_file(file_path) self._owns_file = True self._jobject.file_path = file_path

without checking either write_file or self._jobject for existence.

Also, I know that metadata should be in metadata, and I'm setting the right mime_type, but it still hurts not to put the right extension on my file. I don't know what magic occurs when copying to external storage, but having the right extension seems like the Right Thing To Do to me, and SPOT/DRY be damned.

I will make a patch.

Change History

Changed 6 years ago by homunq

  • owner changed from marco to homunq

Changed 6 years ago by homunq

OK I just figured out the suggested_filename trick, so I won't do the extension part.

Changed 6 years ago by homunq

  • blocking 4365 added

(In #4365) The current base activity class in python is buggy (see 6557) and so you must save when first opening. Making that bug a blocker of this one.

Changed 6 years ago by homunq

  • keywords review? added

http://dev.laptop.org/git?p=users/homunq/sugar-toolkit;a=summary is a commit with a fix for this and 4365.

Changed 6 years ago by marco

  • keywords 8.2.0:? added; review? removed
  • milestone changed from Never Assigned to 8.2.0 (was Update.2)

Please post the patch for review on the list.

Changed 6 years ago by marco

  • keywords r? added; 8.2.0:? removed
  • next_action set to review

Changed 6 years ago by marco

  • keywords r- added; r? removed

Please reference the patch (possibly update it too, since a long time has passed). Thanks.

Changed 6 years ago by marco

  • keywords r- removed
  • next_action changed from review to code
  • milestone changed from 8.2.0 (was Update.2) to 9.1.0
Note: See TracTickets for help on using tickets.