-/*
- * Copyright (C) 1994-2002, Index Data
- * All rights reserved.
- *
- * $Id: trav.c,v 1.39 2002-04-04 20:50:37 adam Exp $
- */
+/* $Id: trav.c,v 1.41 2002-09-03 11:44:54 adam Exp $
+ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
+ Index Data Aps
+This file is part of the Zebra server.
+
+Zebra is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Zebra; see the file LICENSE.zebra. If not, write to the
+Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.
+*/
#include <stdio.h>
#include <assert.h>
#include <sys/types.h>
-#include <sys/stat.h>
#ifdef WIN32
#include <io.h>
#define S_ISREG(x) (x & _S_IFREG)
int i;
size_t rep_len = strlen (rep);
- e = dir_open (rep, zh->path_reg);
+ e = dir_open (rep, zh->path_reg, rGroup->followLinks);
if (!e)
return;
logf (LOG_LOG, "dir %s", rep);
size_t src_len = strlen (src);
sprintf (tmppath, "%s%s", base, src);
- e_src = dir_open (tmppath, zh->path_reg);
+ e_src = dir_open (tmppath, zh->path_reg, rGroup->followLinks);
logf (LOG_LOG, "dir %s", tmppath);
#if 0
sprintf (resStr, "%sdatabasePath", gPrefix);
rGroup->databaseNamePath =
atoi (res_get_def (zh->res, resStr, "0"));
+
+ rGroup->databaseNamePath =
+ atoi (res_get_def (zh->res, resStr, "0"));
+
+ if (rGroup->followLinks == -1)
+ {
+ sprintf (resStr, "%sfollowLinks", gPrefix);
+ rGroup->followLinks =
+ atoi (res_get_def (zh->res, resStr, "1"));
+ }
}
void repositoryShow (ZebraHandle zh)
else
*src = '\0';
strcat (src, path);
- stat (src, &sbuf);
+ zebra_file_stat (src, &sbuf, rGroup->followLinks);
strcpy (src, path);
src_len = strlen (src);
else
*src = '\0';
strcat (src, path);
- stat (src, &sbuf);
+ zebra_file_stat (src, &sbuf, rGroup->followLinks);
strcpy (src, path);