under Solaris, the readdir function doesn't return a full path in the d_name component of dirent, so unless your 'pwd' is .multisync, the multisync binary never loads up any saved syncpairs, as the stat function that checks the existance of directories looks in your local pwd dir.

I don't know what linux does, but would supprised if it's different
from Solaris in this respect - however, that would mean that multisync
wouldn't re-load it's syncpairs every time it ran, and I'm sure someone
else would have complained!

Anyway, patch for syncengine.c attached; made against the 0.80 version.

Regards

marty
*** src/syncengine.c.orig       Mon Aug 11 16:41:42 2003
--- src/syncengine.c    Thu Aug 21 17:57:48 2003
***************
*** 1814,1820 ****
      while ((de = readdir(dir))) {
        gpointer mod;
        sync_pair *pair;
!       if (de->d_type == DT_DIR || de->d_type == DT_UNKNOWN) {
        char *filename;
        FILE *f;
        char line[256];
--- 1814,1825 ----
      while ((de = readdir(dir))) {
        gpointer mod;
        sync_pair *pair;
!       struct stat stbuf;
!       char *dirname;
! 
!         dirname = g_strdup_printf ("%s/%s", datadir, de->d_name);
!         if((stat(dirname, &stbuf) == 0) &&
!                 ((stbuf.st_mode & S_IFMT) == S_IFDIR)) {
        char *filename;
        FILE *f;
        char line[256];
***************
*** 1895,1900 ****
--- 1900,1906 ----
        }
        g_free(filename);
        }
+       g_free(dirname);
      }
      closedir(dir);
    }

Reply via email to