[gnome-documents] model: fix the scope of a variable
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] model: fix the scope of a variable
- Date: Tue, 26 Jul 2011 10:27:23 +0000 (UTC)
commit 5ea74fa1ced6ab2f70c843ecb7db5e181606c087
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Jul 26 12:26:25 2011 +0200
model: fix the scope of a variable
|info| needs to be defined before the try/catch block, otherwise it
can't be accessed after it.
src/trackerModel.js | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/trackerModel.js b/src/trackerModel.js
index 1856082..48d5749 100644
--- a/src/trackerModel.js
+++ b/src/trackerModel.js
@@ -117,8 +117,10 @@ LocalFileInfoLoader.prototype = {
this._file.query_info_async(Gio.FILE_ATTRIBUTE_THUMBNAIL_PATH,
0, 0, null,
Lang.bind(this, function(object, res) {
+ let info = null;
+
try {
- let info = object.query_info_finish(res);
+ info = object.query_info_finish(res);
} catch (e) {
log('Unable to query info for file at ' + uri + ': ' + e.toString());
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]