* Version $Id$
*/
/*
- Copyright (C) 2003-2005 Kern Sibbald
+ Copyright (C) 2003-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
#include "bacula.h"
#include "jcr.h"
-extern const int win32_client;
ATTR *new_attr()
{
return 1;
}
+#if defined(HAVE_WIN32)
static void strip_double_slashes(char *fname)
{
char *p = fname;
}
}
}
+#endif
/*
* Build attr->ofname from attr->fname and
const char *fn;
int wherelen = strlen(jcr->where);
pm_strcpy(attr->ofname, jcr->where); /* copy prefix */
- if (win32_client && attr->fname[1] == ':') {
+#if defined(HAVE_WIN32)
+ if (attr->fname[1] == ':') {
attr->fname[1] = '/'; /* convert : to / */
}
+#endif
fn = attr->fname; /* take whole name */
/* Ensure where is terminated with a slash */
if (jcr->where[wherelen-1] != '/' && fn[0] != '/') {
attr->olname[0] = 0;
add_link = false;
}
- if (win32_client && attr->lname[1] == ':') {
+
+#if defined(HAVE_WIN32)
+ if (attr->lname[1] == ':') {
attr->lname[1] = '/'; /* turn : into / */
}
+#endif
fn = attr->lname; /* take whole name */
/* Ensure where is terminated with a slash */
if (add_link && jcr->where[wherelen-1] != '/' && fn[0] != '/') {
pm_strcat(attr->olname, fn); /* copy rest of link */
}
}
- if (win32_client) {
+#if defined(HAVE_WIN32)
strip_double_slashes(attr->ofname);
strip_double_slashes(attr->olname);
- }
+#endif
}
extern char *getuser(uid_t uid, char *name, int len);