Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
c55378fc
Commit
c55378fc
authored
Jan 31, 2013
by
Sven Strickroth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect msysgit installation of users without admin rights
Signed-off-by: Sven Strickroth <email@cs-ware.de>
parent
ec56af08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
src/win32/findfile.c
+7
-4
No files found.
src/win32/findfile.c
View file @
c55378fc
...
...
@@ -9,8 +9,9 @@
#include "path.h"
#include "findfile.h"
#define REG_MSYSGIT_INSTALL_LOCAL L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Git_is1"
#ifndef _WIN64
#define REG_MSYSGIT_INSTALL
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Git_is1"
#define REG_MSYSGIT_INSTALL
REG_MSYSGIT_INSTALL_LOCAL
#else
#define REG_MSYSGIT_INSTALL L"SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Git_is1"
#endif
...
...
@@ -113,9 +114,11 @@ int win32_find_system_file_using_registry(git_buf *path, const char *filename)
{
struct
win32_path
root
;
if
(
win32_find_msysgit_in_registry
(
&
root
,
HKEY_LOCAL_MACHINE
,
REG_MSYSGIT_INSTALL
))
{
giterr_set
(
GITERR_OS
,
"Cannot locate the system's msysgit directory"
);
return
-
1
;
if
(
win32_find_msysgit_in_registry
(
&
root
,
HKEY_CURRENT_USER
,
REG_MSYSGIT_INSTALL_LOCAL
))
{
if
(
win32_find_msysgit_in_registry
(
&
root
,
HKEY_LOCAL_MACHINE
,
REG_MSYSGIT_INSTALL
))
{
giterr_set
(
GITERR_OS
,
"Cannot locate the system's msysgit directory"
);
return
-
1
;
}
}
if
(
win32_find_file
(
path
,
&
root
,
filename
)
<
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment