Skip to content

Commit

Permalink
Fix for bug #2813
Browse files Browse the repository at this point in the history
  • Loading branch information
extrafu committed Jun 16, 2014
1 parent 8202d05 commit 50c0b49
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -13,6 +13,7 @@ Bug fixes
- fixed the reply/forward operation over ActiveSync (#2805)
- fixed regression when attaching files to a reply
- wait 20 seconds (instead of 2) before deleting temporary download forms (#2811)
- avoid raising exceptions when the db is down and we try to access the preferences module (#2813)

2.2.5 (2014-06-05)
------------------
Expand Down
29 changes: 18 additions & 11 deletions SoObjects/SOGo/SOGoGCSFolder.m
Expand Up @@ -329,17 +329,24 @@ - (void) _fetchDisplayNameFromOwner
fc = [cm acquireOpenChannelForURL: folderLocation];
if (fc)
{
sql
= [NSString stringWithFormat: (@"SELECT c_foldername FROM %@"
@" WHERE c_path = '%@'"),
[folderLocation gcsTableName], ocsPath];
[fc evaluateExpressionX: sql];
attrs = [fc describeResults: NO];
row = [fc fetchAttributes: attrs withZone: NULL];
if (row)
[self _setDisplayNameFromRow: row];
[fc cancelFetch];
[cm releaseChannel: fc];
// We use an exception handler here in case the database is down when
// performing the query. This could have unexpected results.
NS_DURING
{
sql
= [NSString stringWithFormat: (@"SELECT c_foldername FROM %@"
@" WHERE c_path = '%@'"),
[folderLocation gcsTableName], ocsPath];
[fc evaluateExpressionX: sql];
attrs = [fc describeResults: NO];
row = [fc fetchAttributes: attrs withZone: NULL];
if (row)
[self _setDisplayNameFromRow: row];
[fc cancelFetch];
[cm releaseChannel: fc];
}
NS_HANDLER;
NS_ENDHANDLER;
}
}

Expand Down

0 comments on commit 50c0b49

Please sign in to comment.