diff lib/gftp.h @ 852:5e3005923374

2006-11-16 Brian Masney <masneyb@gftp.org> * lib/gftp.h lib/protocols.c lib/local.c - added support for detecting recursive symbolic links. This currently only works when uploading files. It will only work when downloading files if the inode and device are properly populated. I need to check but it may be possible to get this information from the SSH and FSP protocols. (closes #172499)
author masneyb
date Fri, 17 Nov 2006 02:24:14 +0000
parents 8263cc35c027
children 885038cb945b
line wrap: on
line diff
--- a/lib/gftp.h	Fri Nov 17 01:38:51 2006 +0000
+++ b/lib/gftp.h	Fri Nov 17 02:24:14 2006 +0000
@@ -244,6 +244,11 @@
   off_t size,			/* Size of the file */
         startsize;		/* Size to start the transfer at */
   mode_t st_mode;		/* File attributes */
+
+  dev_t st_dev;			/* The device and associated inode. These */
+  ino_t st_ino;			/* two fields are used for detecting loops */
+				/* with symbolic links. */
+
   unsigned int selected : 1,	/* Is this file selected? */
                was_sel : 1,	/* Was this file selected before  */
                shown : 1,	/* Is this file shown? */
@@ -753,6 +758,11 @@
 
 guint string_hash_function		( gconstpointer key );
 
+gint uint_hash_compare 			( gconstpointer path1,
+					  gconstpointer path2 );
+
+guint uint_hash_function		( gconstpointer key );
+
 void free_file_list			( GList * filelist );
 
 gftp_file * copy_fdata 			( gftp_file * fle );