Do

Merge lp://qastaging/~vsevolod-shorin-deactivatedaccount/do/catch-file-exception into lp://qastaging/do

Proposed by Vsevolod Shorin
Status: Rejected
Rejected by: Robert Dyer
Proposed branch: lp://qastaging/~vsevolod-shorin-deactivatedaccount/do/catch-file-exception
Merge into: lp://qastaging/do
Diff against target: 19 lines (+7/-2)
1 file modified
Do.Interface.Linux.Docky/src/Docky.Core/Docky.Core.Default/ItemsService.cs (+7/-2)
To merge this branch: bzr merge lp://qastaging/~vsevolod-shorin-deactivatedaccount/do/catch-file-exception
Reviewer Review Type Date Requested Status
Robert Dyer (community) Disapprove
Review via email: mp+15194@code.qastaging.launchpad.net
To post a comment you must log in.
Revision history for this message
Vsevolod Shorin (vsevolod-shorin-deactivatedaccount) wrote :

File.Exists and Directory.Exists may throw exceptions when the passed path is someway bad, e.g. too long. We need to catch and ignore them.

Revision history for this message
Robert Dyer (psybers) wrote :

Thank you for your bug fix. Note however that Docky 1 (the Gnome Do theme) has reached the end of its maintenance period. Thus we are not submitting any more patches to that branch as it will be removed shortly from Do.

If you would like to help us out, please submit patches against lp:docky, which is the stand-alone application that we call Docky 2.

review: Disapprove
Revision history for this message
Vsevolod Shorin (vsevolod-shorin-deactivatedaccount) wrote :

Maybe the fix should be merged to 0.8 branch? This is the real problem I
faced on my computer.

2009/11/24 Robert Dyer <email address hidden>

> Review: Disapprove
> Thank you for your bug fix. Note however that Docky 1 (the Gnome Do theme)
> has reached the end of its maintenance period. Thus we are not submitting
> any more patches to that branch as it will be removed shortly from Do.
>
> If you would like to help us out, please submit patches against lp:docky,
> which is the stand-alone application that we call Docky 2.
> --
>
> https://code.launchpad.net/~vsevolod-shorin/do/catch-file-exception/+merge/15194<https://code.launchpad.net/%7Evsevolod-shorin/do/catch-file-exception/+merge/15194>
> You are the owner of lp:~vsevolod-shorin/do/catch-file-exception.
>

Unmerged revisions

1316. By Всеволод Шорин <vevolod@vevolod-koala>

Catch exception thrown when path is inacceptable

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Do.Interface.Linux.Docky/src/Docky.Core/Docky.Core.Default/ItemsService.cs'
2--- Do.Interface.Linux.Docky/src/Docky.Core/Docky.Core.Default/ItemsService.cs 2009-07-08 19:02:56 +0000
3+++ Do.Interface.Linux.Docky/src/Docky.Core/Docky.Core.Default/ItemsService.cs 2009-11-24 14:05:21 +0000
4@@ -259,8 +259,13 @@
5
6 if (identifier.StartsWith ("file://"))
7 identifier = identifier.Substring ("file://".Length);
8-
9- if (File.Exists (identifier) || Directory.Exists (identifier)) {
10+
11+ bool exists = false;
12+ try {
13+ exists = File.Exists (identifier) || Directory.Exists (identifier);
14+ } catch {
15+ }
16+ if (exists) {
17 if (identifier.EndsWith (".desktop")) {
18 bool writeable = true;
19 try {