Fix off-by-one error. (#100853)

2002-12-11  Tor Lillqvist  <tml@iki.fi>

	* glib/gtimer.c (g_timer_elapsed): Fix off-by-one error. (#100853)

	* glib/gfileutils.c (g_file_test): Bypass extra test for root on
	Win32.

	* glib/glib.def: Add g_{get,set}_application_name.
This commit is contained in:
Tor Lillqvist
2002-12-11 23:40:10 +00:00
committed by Tor Lillqvist
parent d0579998b2
commit 12bc3d826c
10 changed files with 70 additions and 3 deletions

View File

@@ -156,14 +156,16 @@ g_file_test (const gchar *filename,
if ((test & G_FILE_TEST_IS_DIR) && S_ISDIR (s.st_mode))
return TRUE;
#ifndef G_OS_WIN32
/* The extra test for root when access (file, X_OK) succeeds.
* Probably only makes sense on Unix.
*/
if ((test & G_FILE_TEST_IS_EXECUTABLE) &&
((s.st_mode & S_IXOTH) ||
(s.st_mode & S_IXUSR) ||
(s.st_mode & S_IXGRP)))
return TRUE;
#endif
}
}