Throw error when given no mimetype instead of listing all contracts
Bug #1234267 reported by
Sergey "Shnatsel" Davidoff
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_
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
lp:~shnatsel/contractor/fix-1234267
Superseded
for merging
into
lp:contractor/0.3
- Victor Martinez (community): Needs Fixing
-
Diff: 52 lines (+25/-5)1 file modifiedsrc/DBusService.vala (+25/-5)
summary: |
- Throw error when given "" instead of listing all contracts + Throw error when given no mimetype instead of listing all contracts |
Changed in contractor: | |
assignee: | nobody → Sergey "Shnatsel" Davidoff (shnatsel) |
Changed in contractor: | |
status: | In Progress → Fix Committed |
Changed in contractor: | |
milestone: | none → 0.1 |
Changed in contractor: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Curiously, Granite's contractor interface definition already expects these methods to throw errors, while in Contractor they actually cannot do it right now.