gnome-commander r1897 - in trunk: . src



Author: epiotr
Date: Sat Jul 19 22:39:00 2008
New Revision: 1897
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1897&view=rev

Log:
Fix for bug introduced in rev. #1669

Modified:
   trunk/ChangeLog
   trunk/src/gnome-cmd-con.cc

Modified: trunk/src/gnome-cmd-con.cc
==============================================================================
--- trunk/src/gnome-cmd-con.cc	(original)
+++ trunk/src/gnome-cmd-con.cc	Sat Jul 19 22:39:00 2008
@@ -467,9 +467,10 @@
     GnomeCmdPath *path = gnome_cmd_con_create_path (con, path_str);
     GnomeVFSURI *uri = gnome_cmd_con_create_uri (con, path);
     GnomeVFSFileInfo *info = gnome_vfs_file_info_new ();
-    GnomeVFSFileInfoOptions infoOpts = info->type!=GNOME_VFS_FILE_TYPE_SYMBOLIC_LINK ? GNOME_VFS_FILE_INFO_DEFAULT
-                                                                                     : (GnomeVFSFileInfoOptions) (GNOME_VFS_FILE_INFO_DEFAULT | GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
-    GnomeVFSResult res = gnome_vfs_get_file_info_uri (uri, info, infoOpts);
+    GnomeVFSResult res = gnome_vfs_get_file_info_uri (uri, info, GNOME_VFS_FILE_INFO_DEFAULT);
+
+    if (res == GNOME_VFS_OK && info->type == GNOME_VFS_FILE_TYPE_SYMBOLIC_LINK)         // resolve the symlink to get the real type of it
+        res = gnome_vfs_get_file_info_uri (uri, info, (GnomeVFSFileInfoOptions) (GNOME_VFS_FILE_INFO_DEFAULT | GNOME_VFS_FILE_INFO_FOLLOW_LINKS));
 
     if (res == GNOME_VFS_OK)
         *type = info->type;



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