Commit f3bccb10163a2a13e6e586d0f189eea03c2df0a7
Add Windows version check for new ga command
It works on Vista and above.
Author: xaizek
Author date (UTC): 2011-09-26 19:52
Committer name: xaizek
Committer date (UTC): 2011-09-26 19:52
Parent(s): 9dd2a4310a75c565702137d540766e1c0358310f
Signing key:
Tree: 495aee878fddf806aaeea403d03344426f351828
File src/fileops.c changed (mode: 100644) (index 960cf14f3..3ef660dca) |
... |
... |
handle_file(FileView *view, int dont_execute, int force_follow) |
935 |
935 |
#ifndef _WIN32 |
#ifndef _WIN32 |
936 |
936 |
shellout(buf, 1); |
shellout(buf, 1); |
937 |
937 |
#else |
#else |
938 |
|
if(curr_stats.as_admin) |
|
|
938 |
|
if(curr_stats.as_admin && is_vista_and_above()) |
939 |
939 |
{ |
{ |
940 |
940 |
SHELLEXECUTEINFOA sei; |
SHELLEXECUTEINFOA sei; |
941 |
941 |
memset(&sei, 0, sizeof(sei)); |
memset(&sei, 0, sizeof(sei)); |
File src/utils.c changed (mode: 100644) (index 475b244c2..b9c02d5df) |
... |
... |
is_win_executable(const char *name) |
1429 |
1429 |
return 0; |
return 0; |
1430 |
1430 |
} |
} |
1431 |
1431 |
|
|
|
1432 |
|
int |
|
1433 |
|
is_vista_and_above(void) |
|
1434 |
|
{ |
|
1435 |
|
DWORD v = GetVersion(); |
|
1436 |
|
return ((v & 0xff) >= 6); |
|
1437 |
|
} |
|
1438 |
|
|
1432 |
1439 |
#endif |
#endif |
1433 |
1440 |
|
|
1434 |
1441 |
/* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ |
/* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ |