Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
26b9cc66
Commit
26b9cc66
authored
12 years ago
by
Ansgar Philippsen
Browse files
Options
Downloads
Patches
Plain Diff
use OST_ROOT as fallback for prefix_path
parent
0f3a7806
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/base/src/platform.cc
+9
-1
9 additions, 1 deletion
modules/base/src/platform.cc
with
9 additions
and
1 deletion
modules/base/src/platform.cc
+
9
−
1
View file @
26b9cc66
...
...
@@ -16,6 +16,7 @@
// along with this library; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//------------------------------------------------------------------------------
#include
<cstdlib>
#include
<boost/filesystem/path.hpp>
#include
<ost/platform.hh>
using
boost
::
filesystem
::
path
;
...
...
@@ -29,7 +30,14 @@ void SetPrefixPath(const String& prefix)
String
GetPrefixPath
()
{
assert
(
path_prefix
!=
""
);
//assert(path_prefix!="");
if
(
path_prefix
==
""
)
{
char
*
ost_root
=
getenv
(
"OST_ROOT"
);
if
(
!
ost_root
)
{
throw
std
::
runtime_error
(
"missing PrefixPath, and no fallback OST_ROOT env var"
);
}
path_prefix
=
std
::
string
(
ost_root
);
}
return
path_prefix
;
}
...
...
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