[gnome-commander] noop: code cleanup



commit b43ec1d4496528d80c6ec1834acc0a3ef9814c8e
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Sat Apr 9 13:30:39 2011 +0200

    noop: code cleanup

 src/gnome-cmd-dir.cc |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/src/gnome-cmd-dir.cc b/src/gnome-cmd-dir.cc
index f931353..5817988 100644
--- a/src/gnome-cmd-dir.cc
+++ b/src/gnome-cmd-dir.cc
@@ -301,12 +301,6 @@ GnomeCmdDir *gnome_cmd_dir_new (GnomeCmdCon *con, GnomeCmdPath *path)
     g_return_val_if_fail (GNOME_CMD_IS_CON (con), NULL);
     g_return_val_if_fail (path!=NULL, NULL);
 
-    GnomeVFSFileInfo *info;
-    GnomeVFSResult res;
-    GnomeVFSFileInfoOptions infoOpts = (GnomeVFSFileInfoOptions) (GNOME_VFS_FILE_INFO_FOLLOW_LINKS |
-                                                                  GNOME_VFS_FILE_INFO_GET_MIME_TYPE |
-                                                                  GNOME_VFS_FILE_INFO_FORCE_FAST_MIME_TYPE);
-
     GnomeVFSURI *uri = gnome_cmd_con_create_uri (con, path);
     if (!uri) return NULL;
 
@@ -319,8 +313,12 @@ GnomeCmdDir *gnome_cmd_dir_new (GnomeCmdCon *con, GnomeCmdPath *path)
         return dir;
     }
 
-    info = gnome_vfs_file_info_new ();
-    res = gnome_vfs_get_file_info_uri (uri, info, infoOpts);
+    GnomeVFSFileInfoOptions infoOpts = (GnomeVFSFileInfoOptions) (GNOME_VFS_FILE_INFO_FOLLOW_LINKS |
+                                                                  GNOME_VFS_FILE_INFO_GET_MIME_TYPE |
+                                                                  GNOME_VFS_FILE_INFO_FORCE_FAST_MIME_TYPE);
+    GnomeVFSFileInfo *info = gnome_vfs_file_info_new ();
+    GnomeVFSResult res = gnome_vfs_get_file_info_uri (uri, info, infoOpts);
+
     if (res == GNOME_VFS_OK)
     {
         dir = (GnomeCmdDir *) g_object_new (GNOME_CMD_TYPE_DIR, NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]