gvfs r1569 - in trunk: . daemon
- From: otte svn gnome org
- To: svn-commits-list gnome org
- Subject: gvfs r1569 - in trunk: . daemon
- Date: Wed, 5 Mar 2008 22:48:31 +0000 (GMT)
Author: otte
Date: Wed Mar 5 22:48:30 2008
New Revision: 1569
URL: http://svn.gnome.org/viewvc/gvfs?rev=1569&view=rev
Log:
2008-03-05 Benjamin Otte <otte gnome org>
* daemon/gvfsbackendftp.c: (dir_default_iter_process),
(do_enumerate):
don't list "." and ".." directories.
Modified:
trunk/ChangeLog
trunk/daemon/gvfsbackendftp.c
Modified: trunk/daemon/gvfsbackendftp.c
==============================================================================
--- trunk/daemon/gvfsbackendftp.c (original)
+++ trunk/daemon/gvfsbackendftp.c Wed Mar 5 22:48:30 2008
@@ -892,6 +892,20 @@
if (type != 'd' && type != 'f' && type != 'l')
return NULL;
+ /* don't list . and .. directories
+ * Let's hope they're not important files on some ftp servers
+ */
+ if (type == 'd')
+ {
+ if (result.fe_fnlen == 1 &&
+ result.fe_fname[0] == '.')
+ return NULL;
+ if (result.fe_fnlen == 2 &&
+ result.fe_fname[0] == '.' &&
+ result.fe_fname[1] == '.')
+ return NULL;
+ }
+
s = g_strndup (result.fe_fname, result.fe_fnlen);
if (dirname)
{
@@ -904,7 +918,10 @@
return NULL;
if (must_match_file && !ftp_filename_equal (name, must_match_file))
- return NULL;
+ {
+ g_free (name);
+ return NULL;
+ }
info = g_file_info_new ();
@@ -1903,7 +1920,7 @@
iter = ftp->dir_ops->iter_new (conn);
for (walk = files; walk; walk = walk->next)
{
- char *symlink;
+ char *symlink = NULL;
info = ftp->dir_ops->iter_process (iter,
conn,
dir,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]