Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
1c65908c
Commit
1c65908c
authored
Sep 12, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ConfigPath: simplify the duplicate tilde check
parent
3aaf013d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
ConfigPath.cxx
src/ConfigPath.cxx
+5
-5
No files found.
src/ConfigPath.cxx
View file @
1c65908c
...
@@ -87,11 +87,7 @@ ParsePath(const char *path, Error &error)
...
@@ -87,11 +87,7 @@ ParsePath(const char *path, Error &error)
return
Path
::
Null
();
return
Path
::
Null
();
#ifndef WIN32
#ifndef WIN32
if
(
!
g_path_is_absolute
(
path
)
&&
path
[
0
]
!=
'~'
)
{
if
(
path
[
0
]
==
'~'
)
{
error
.
Format
(
path_domain
,
"not an absolute path: %s"
,
path
);
return
Path
::
Null
();
}
else
if
(
path
[
0
]
==
'~'
)
{
Path
home
=
Path
::
Null
();
Path
home
=
Path
::
Null
();
if
(
path
[
1
]
==
'/'
||
path
[
1
]
==
'\0'
)
{
if
(
path
[
1
]
==
'/'
||
path
[
1
]
==
'\0'
)
{
...
@@ -116,6 +112,10 @@ ParsePath(const char *path, Error &error)
...
@@ -116,6 +112,10 @@ ParsePath(const char *path, Error &error)
return
Path
::
Null
();
return
Path
::
Null
();
return
Path
::
Build
(
home
,
path2
);
return
Path
::
Build
(
home
,
path2
);
}
else
if
(
!
g_path_is_absolute
(
path
))
{
error
.
Format
(
path_domain
,
"not an absolute path: %s"
,
path
);
return
Path
::
Null
();
}
else
{
}
else
{
#endif
#endif
return
path2
;
return
path2
;
...
...
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