Bug 248611 - SFTP protocol displays symlink to dir as file; r=cbiesinger
authorMichal Novotny <michal@allpeers.com>
Tue, 24 Feb 2009 17:53:34 +0100
changeset 25428 0241ddee070291a47ff967a7c1d800325287d099
parent 25427 9f8224db57f5796ad4d43fd9fef9e9f043ce242d
child 25429 9911d8835e1bc517fbb2dad4857bae5cd23d9978
push id5552
push usersgautherie.bz@free.fr
push dateTue, 24 Feb 2009 16:54:05 +0000
treeherdermozilla-central@9911d8835e1b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscbiesinger
bugs248611
milestone1.9.2a1pre
Bug 248611 - SFTP protocol displays symlink to dir as file; r=cbiesinger
extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp
--- a/extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp
+++ b/extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp
@@ -418,17 +418,19 @@ nsGnomeVFSInputStream::DoOpen()
   //     URI as a directory.  Also, it would have been ideal if
   //     gnome_vfs_get_file_info_from_handle were actually implemented by the
   //     smb:// module, since that would have allowed us to potentially save a
   //     round trip to the server to discover the mime type of the document in
   //     the case where gnome_vfs_open would have been used.  (Oh well!  /me
   //     throws hands up in the air and moves on...)
 
   GnomeVFSFileInfo info = {0};
-  rv = gnome_vfs_get_file_info(mSpec.get(), &info, GNOME_VFS_FILE_INFO_DEFAULT);
+  rv = gnome_vfs_get_file_info(mSpec.get(), &info, GnomeVFSFileInfoOptions(
+                               GNOME_VFS_FILE_INFO_DEFAULT |
+                               GNOME_VFS_FILE_INFO_FOLLOW_LINKS));
   if (rv == GNOME_VFS_OK)
   {
     if (info.type == GNOME_VFS_FILE_TYPE_DIRECTORY)
     {
       rv = gnome_vfs_directory_list_load(&mDirList, mSpec.get(),
                                          GNOME_VFS_FILE_INFO_DEFAULT);
 
       LOG(("gnomevfs: gnome_vfs_directory_list_load returned %d (%s) [spec=\"%s\"]\n",