Look also for (illegal) forward slashes in the template.

2001-01-05  Tor Lillqvist  <tml@iki.fi>

	* gfileutils.c (g_file_open_tmp): (Win32:) Look also for (illegal)
	forward slashes in the template.

	* gutils.c (g_path_skip_root): On Win32, skip the \\server\share
	part of UNC paths. On all platforms, skip several initial
	slashes. Add a few comments.
	(g_get_any_init): On Win32, in case HOME is Unix-style with
	(forward) slashes (some other applications apparently set it up
	this way, convert to backslashed form.

	* configure.in (glib_os): Remove stray 'v'. Add case for mingw,
	although using configure for mingw surely doesn't work yet.

	* glib.def: Update.
This commit is contained in:
Tor Lillqvist
2001-01-05 19:30:13 +00:00
committed by Tor Lillqvist
parent 568691c600
commit ebf8fe6a92
15 changed files with 210 additions and 19 deletions

View File

@@ -625,7 +625,11 @@ g_file_open_tmp (const char *tmpl,
if (tmpl == NULL)
tmpl = ".XXXXXX";
if (strchr (tmpl, G_DIR_SEPARATOR))
if (strchr (tmpl, G_DIR_SEPARATOR)
#ifdef G_OS_WIN32
|| strchr (tmpl, '/')
#endif
)
{
g_set_error (error,
G_FILE_ERROR,