comparison src/gtk/dnd.c @ 499:39e9945288ea

2004-7-13 Brian Masney <masneyb@gftp.org> * lib/gftp.h lib/local.c lib/misc.c lib/protocols.c lib/rfc2068.c lib/rfc959.c lib/sshv2.c src/gtk/chmod_dialog.c src/gtk/delete_dialog.c src/gtk/dnd.c src/gtk/gftp-gtk.c src/gtk/gtkui_transfer.c src/gtk/menu-items.c src/gtk/misc-gtk.c src/gtk/view_dialog.c src/text/textui.c src/uicommon/gftpui.c src/uicommon/gftpuicallbacks.c - represent the file attributes as a mode_t variable instead of a character string
author masneyb
date Tue, 13 Jul 2004 20:17:42 +0000
parents 5100b89c44e1
children c6a6e908dbaf
comparison
equal deleted inserted replaced
498:76c4e4cd108e 499:39e9945288ea
40 40
41 newfle = g_malloc0 (sizeof (*newfle)); 41 newfle = g_malloc0 (sizeof (*newfle));
42 newfle->shown = 1; 42 newfle->shown = 1;
43 if (url[strlen (url) - 1] == '/') 43 if (url[strlen (url) - 1] == '/')
44 { 44 {
45 newfle->isdir = 1; 45 newfle->st_mode |= S_IFDIR;
46 url[strlen (url) - 1] = '\0'; 46 url[strlen (url) - 1] = '\0';
47 } 47 }
48 48
49 current_ftpdata = gftp_request_new (); 49 current_ftpdata = gftp_request_new ();
50 current_ftpdata->logging_function = ftp_log; 50 current_ftpdata->logging_function = ftp_log;
190 190
191 g_free (df); 191 g_free (df);
192 192
193 /* Note, I am allocating memory for this byte above. Note the extra space 193 /* Note, I am allocating memory for this byte above. Note the extra space
194 at the end of the g_strdup_printf() format argument */ 194 at the end of the g_strdup_printf() format argument */
195 if (tempfle->isdir) 195 if (S_ISDIR (tempfle->st_mode))
196 tempstr[strlen (tempstr) - 1] = '/'; 196 tempstr[strlen (tempstr) - 1] = '/';
197 else 197 else
198 tempstr[strlen (tempstr) - 1] = '\0'; 198 tempstr[strlen (tempstr) - 1] = '\0';
199 199
200 totlen += strlen (tempstr); 200 totlen += strlen (tempstr);