Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
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
张蕾
Geth-Modification
Commits
0ab8a175
Commit
0ab8a175
authored
Jan 08, 2016
by
Felix Lange
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2110 from LefterisJP/determining_home_for_ubuntu_core
common: Fix HomeDir detection
parents
32226f1b
e2fdd335
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
path.go
common/path.go
+6
-5
No files found.
common/path.go
View file @
0ab8a175
...
@@ -63,13 +63,14 @@ func AbsolutePath(Datadir string, filename string) string {
...
@@ -63,13 +63,14 @@ func AbsolutePath(Datadir string, filename string) string {
return
filepath
.
Join
(
Datadir
,
filename
)
return
filepath
.
Join
(
Datadir
,
filename
)
}
}
func
HomeDir
()
(
home
string
)
{
func
HomeDir
()
string
{
if
home
:=
os
.
Getenv
(
"HOME"
);
home
!=
""
{
return
home
}
if
usr
,
err
:=
user
.
Current
();
err
==
nil
{
if
usr
,
err
:=
user
.
Current
();
err
==
nil
{
home
=
usr
.
HomeDir
return
usr
.
HomeDir
}
else
{
home
=
os
.
Getenv
(
"HOME"
)
}
}
return
return
""
}
}
func
DefaultDataDir
()
string
{
func
DefaultDataDir
()
string
{
...
...
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