Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
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
Chen Yisong
googletest
Commits
64df8e34
Commit
64df8e34
authored
Jul 29, 2014
by
kosak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mock out GetCurrentDir in NaCl.
parent
b54098a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
gtest-filepath.cc
src/gtest-filepath.cc
+8
-1
No files found.
src/gtest-filepath.cc
View file @
64df8e34
...
...
@@ -106,7 +106,14 @@ FilePath FilePath::GetCurrentDir() {
return
FilePath
(
_getcwd
(
cwd
,
sizeof
(
cwd
))
==
NULL
?
""
:
cwd
);
#else
char
cwd
[
GTEST_PATH_MAX_
+
1
]
=
{
'\0'
};
return
FilePath
(
getcwd
(
cwd
,
sizeof
(
cwd
))
==
NULL
?
""
:
cwd
);
char
*
result
=
getcwd
(
cwd
,
sizeof
(
cwd
));
# if GTEST_OS_NACL
// getcwd will likely fail in NaCl due to the sandbox, so return something
// reasonable. The user may have provided a shim implementation for getcwd,
// however, so fallback only when failure is detected.
return
FilePath
(
result
==
NULL
?
kCurrentDirectoryString
:
cwd
);
# endif // GTEST_OS_NACL
return
FilePath
(
result
==
NULL
?
""
:
cwd
);
#endif // GTEST_OS_WINDOWS_MOBILE
}
...
...
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