Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mercurial-devel
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mercurial
mercurial-devel
Commits
7ee7b7426aad
Commit
7ee7b7426aad
authored
13 years ago
by
Marc-Antoine Ruel
Browse files
Options
Downloads
Patches
Plain Diff
posix: fix findexe() to check for file type and access
parent
eb5ed02d8743
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mercurial/posix.py
+2
-4
2 additions, 4 deletions
mercurial/posix.py
with
2 additions
and
4 deletions
mercurial/posix.py
+
2
−
4
View file @
7ee7b742
...
...
@@ -258,7 +258,7 @@
def
findexisting
(
executable
):
'
Will return executable if existing file
'
if
os
.
path
.
exist
s
(
executable
):
if
os
.
path
.
isfile
(
executable
)
and
os
.
acces
s
(
executable
,
os
.
X_OK
):
return
executable
return
None
...
...
@@ -268,9 +268,7 @@
for
path
in
os
.
environ
.
get
(
'
PATH
'
,
''
).
split
(
os
.
pathsep
):
executable
=
findexisting
(
os
.
path
.
join
(
path
,
command
))
if
executable
is
not
None
:
st
=
os
.
stat
(
executable
)
if
(
st
.
st_mode
&
(
stat
.
S_IXUSR
|
stat
.
S_IXGRP
|
stat
.
S_IXOTH
)):
return
executable
return
executable
return
None
def
setsignalhandler
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment