Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Main
Synchronet
Commits
01a94bdc
Commit
01a94bdc
authored
1 year ago
by
Deucе
Browse files
Options
Downloads
Patches
Plain Diff
Remove /vfiles and use a dash instead of a big solidus.
parent
ec83b41c
No related branches found
No related tags found
No related merge requests found
Pipeline
#6026
passed
1 year ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/sftp.cpp
+5
-7
5 additions, 7 deletions
src/sbbs3/sftp.cpp
with
5 additions
and
7 deletions
src/sbbs3/sftp.cpp
+
5
−
7
View file @
01a94bdc
...
...
@@ -86,7 +86,7 @@ static struct pathmap static_files[] = {
{
SLASH_HOME
"/%s/plan"
,
"%suser/%04d.plan"
,
nullptr
,
homefile_attrs
},
{
SLASH_HOME
"/%s/signature"
,
"%suser/%04d.sig"
,
nullptr
,
homefile_attrs
},
{
SLASH_HOME
"/%s/smtptags"
,
"%suser/%04d.smtptags"
,
nullptr
,
homefile_attrs
},
{
SLASH_VFILES
"/"
,
nullptr
,
nullptr
,
rootdir_attrs
},
//
{SLASH_VFILES "/", nullptr, nullptr, rootdir_attrs},
};
constexpr
size_t
static_files_sz
=
(
sizeof
(
static_files
)
/
sizeof
(
static_files
[
0
]));
...
...
@@ -529,7 +529,8 @@ in_tree(const char *path)
}
/*
* Replaces a Solidus (aka: slash) with a U+29F8 Big Solidus
* Replaces a slash with a dash.
*
* The SFTP protocol requires the use of Solidus as a path separator,
* and dir and lib names can contain it. Rather than a visually
* different and one-way mapping as used in the FTP server, take
...
...
@@ -556,11 +557,8 @@ expand_slash(const char *orig)
return
p
;
p3
=
p
;
for
(
p2
=
orig
;
*
p2
;
p2
++
)
{
if
(
*
p2
==
'/'
)
{
*
p3
++
=
0xe2
;
*
p3
++
=
0xa7
;
*
p3
++
=
0xb8
;
}
if
(
*
p2
==
'/'
)
*
p3
++
=
'-'
;
else
*
p3
++
=
*
p2
;
}
...
...
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