char *srcpath;
};
-/*
- * Return a pointer to the portion of str that comes after the last
- * slash (or backslash or colon, if `local' is TRUE).
- */
-static char *stripslashes(char *str, int local)
+char *stripslashes(const char *str, int local)
{
char *p;
+ /*
+ * On Windows, \ / : are all path component separators.
+ */
+
if (local) {
p = strchr(str, ':');
if (p) str = p+1;
if (p) str = p+1;
}
- return str;
+ return (char *)str;
}
WildcardMatcher *begin_wildcard_matching(const char *name)
return ctx->line;
}
+void platform_psftp_post_option_setup(void)
+{
+#if !defined UNPROTECT && !defined NO_SECURITY
+ /*
+ * Protect our process.
+ */
+ {
+ char *error = NULL;
+ if (!setprocessacl(error)) {
+ char *message = dupprintf("Could not restrict process ACL: %s",
+ error);
+ logevent(NULL, message);
+ sfree(message);
+ sfree(error);
+ }
+ }
+#endif
+}
+
/* ----------------------------------------------------------------------
* Main program. Parse arguments etc.
*/