Update of /cvsroot/gtkpod/gtkpod/src
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv17374/src
Modified Files:
syncdir.c
Log Message:
* src/syncdir.c: fix problem when directory to sync ends with '/'.
Index: syncdir.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/syncdir.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- syncdir.c 30 Aug 2006 15:39:31 -0000 1.5
+++ syncdir.c 2 Sep 2006 03:27:12 -0000 1.6
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-08-31 00:34:18 jcs>
+/* Time-stamp: <2006-09-01 22:30:24 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -491,7 +491,18 @@
if (syncdir)
{
- g_hash_table_insert (dirs_hash, g_strdup (syncdir), NULL);
+ /* make sure the directory name does not end in '/' -- the
+ code below does not seem to like this */
+ gint len = strlen (syncdir);
+ gchar *dir = g_strdup (syncdir);
+ if (len > 1)
+ {
+ if (G_IS_DIR_SEPARATOR (dir[len-1]))
+ {
+ dir[len-1] = 0;
+ }
+ }
+ g_hash_table_insert (dirs_hash, dir, NULL);
}
else
{
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2