Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LSH
lsh
Commits
fb6fcfb3
Commit
fb6fcfb3
authored
May 25, 2002
by
Pontus Freyhult
Browse files
New function lsftp_path_is_absolute.
Rev: src/sftp/sftp_bind.c:1.10
parent
89a8868d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sftp/sftp_bind.c
View file @
fb6fcfb3
...
...
@@ -1259,8 +1259,25 @@ lsftp_do_cd(const char *dir)
return
0
;
}
int
lsftp_path_is_absolute
(
const
char
*
path
)
{
/* Return 0 if the path given is not absolute */
/* FIXME: Assumes the path is absolute iff it begins with / */
if
(
path
&&
(
path
[
0
]
==
'/'
)
)
return
1
;
return
0
;
}
const
char
*
lsftp_unqualify_path
(
const
char
*
path
)
lsftp_unqualify_path
(
const
char
*
path
)
{
/*
* Returns the part that was passed to lsftp_qualify_path
...
...
@@ -1299,7 +1316,7 @@ lsftp_qualify_path(const char *path)
* side (no operation on absoulte paths, adds pwd/ to relative paths
*/
if
(
'/'
==
path
[
0
]
||
if
(
lsftp_path_is_absolute
(
path
)
||
!
curpath
||
!
curpath
[
0
]
)
...
...
Write
Preview
Supports
Markdown
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