mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-24 10:57:53 +02:00
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:
committed by
Tor Lillqvist
parent
d0579998b2
commit
12bc3d826c
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user