good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
f8cdff9a
Commit
f8cdff9a
authored
Apr 29, 2015
by
Taylor Gerring
Browse files
Options
Downloads
Patches
Plain Diff
Remove path separator literals
parent
a6a49ccb
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/path.go
+7
-6
7 additions, 6 deletions
common/path.go
with
7 additions
and
6 deletions
common/path.go
+
7
−
6
View file @
f8cdff9a
...
@@ -21,9 +21,10 @@ func MakeName(name, version string) string {
...
@@ -21,9 +21,10 @@ func MakeName(name, version string) string {
func
ExpandHomePath
(
p
string
)
(
path
string
)
{
func
ExpandHomePath
(
p
string
)
(
path
string
)
{
path
=
p
path
=
p
sep
:=
fmt
.
Sprintf
(
"%s"
,
os
.
PathSeparator
)
// Check in case of paths like "/something/~/something/"
// Check in case of paths like "/something/~/something/"
if
len
(
p
ath
)
>
1
&&
p
ath
[
:
2
]
==
"~
/
"
{
if
len
(
p
)
>
1
&&
p
[
:
1
+
len
(
sep
)
]
==
"~"
+
sep
{
usr
,
_
:=
user
.
Current
()
usr
,
_
:=
user
.
Current
()
dir
:=
usr
.
HomeDir
dir
:=
usr
.
HomeDir
...
@@ -64,11 +65,11 @@ func DefaultAssetPath() string {
...
@@ -64,11 +65,11 @@ func DefaultAssetPath() string {
case
"darwin"
:
case
"darwin"
:
// Get Binary Directory
// Get Binary Directory
exedir
,
_
:=
osext
.
ExecutableFolder
()
exedir
,
_
:=
osext
.
ExecutableFolder
()
assetPath
=
filepath
.
Join
(
exedir
,
"..
/
Resources"
)
assetPath
=
filepath
.
Join
(
exedir
,
"..
"
,
"
Resources"
)
case
"linux"
:
case
"linux"
:
assetPath
=
"/usr/
share
/
mist"
assetPath
=
path
.
Join
(
"usr"
,
"
share
"
,
"
mist"
)
case
"windows"
:
case
"windows"
:
assetPath
=
"./
assets"
assetPath
=
path
.
Join
(
"."
,
"
assets"
)
default
:
default
:
assetPath
=
"."
assetPath
=
"."
}
}
...
@@ -86,9 +87,9 @@ func DefaultAssetPath() string {
...
@@ -86,9 +87,9 @@ func DefaultAssetPath() string {
func
DefaultDataDir
()
string
{
func
DefaultDataDir
()
string
{
usr
,
_
:=
user
.
Current
()
usr
,
_
:=
user
.
Current
()
if
runtime
.
GOOS
==
"darwin"
{
if
runtime
.
GOOS
==
"darwin"
{
return
path
.
Join
(
usr
.
HomeDir
,
"Library
/
Ethereum"
)
return
path
.
Join
(
usr
.
HomeDir
,
"Library
"
,
"
Ethereum"
)
}
else
if
runtime
.
GOOS
==
"windows"
{
}
else
if
runtime
.
GOOS
==
"windows"
{
return
path
.
Join
(
usr
.
HomeDir
,
"AppData
/
Roaming
/
Ethereum"
)
return
path
.
Join
(
usr
.
HomeDir
,
"AppData
"
,
"
Roaming
"
,
"
Ethereum"
)
}
else
{
}
else
{
return
path
.
Join
(
usr
.
HomeDir
,
".ethereum"
)
return
path
.
Join
(
usr
.
HomeDir
,
".ethereum"
)
}
}
...
...
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