Throw error when given no mimetype instead of listing all contracts

Bug #1234267 reported by Sergey "Shnatsel" Davidoff on 2013-10-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Contractor
Fix Released
Undecided
Sergey "Shnatsel" Davidoff

Bug Description

Currently Contractor lists all available contracts if given "" as mimetype in get_contracts_by_mime () function and array of "" in get_contracts_by_mimelist () function.

This typically happens when the application fails to determine the mime type of a file, i.e. if the file is read-only or doesn't exist. Thus it will be wiser to throw an error when this happens instead of listing all available contracts, for which there is already list_all_contracts () function.

Until this is done applications have to perform such null checks themselves, which is rather ugly.

Related branches

summary: - Throw error when given "" instead of listing all contracts
+ Throw error when given no mimetype instead of listing all contracts

Curiously, Granite's contractor interface definition already expects these methods to throw errors, while in Contractor they actually cannot do it right now.

Changed in contractor:
status: New → In Progress
Changed in contractor:
assignee: nobody → Sergey "Shnatsel" Davidoff (shnatsel)
Changed in contractor:
status: In Progress → Fix Committed
Victor Martinez (victored) wrote :

Can somebody publish this fix for Luna so that secondary-clicking network volumes in Pantheon Files doesn't show all the contracts?

Sure thing

On Mon, Oct 21, 2013 at 3:42 AM, Victor Martinez <email address hidden>wrote:

> Can somebody publish this fix for Luna so that secondary-clicking
> network volumes in Pantheon Files doesn't show all the contracts?
>
> --
> You received this bug notification because you are subscribed to
> elementary.
> https://bugs.launchpad.net/bugs/1234267
>
> Title:
> Throw error when given no mimetype instead of listing all contracts
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/contractor/+bug/1234267/+subscriptions
>

--
Cody Garver

Daniel Fore (danrabbit) on 2014-10-23
Changed in contractor:
milestone: none → 0.1
Daniel Fore (danrabbit) on 2015-04-30
Changed in contractor:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers