Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Levin Zimmermann
go-fuse
Commits
4f38a2d6
Commit
4f38a2d6
authored
May 15, 2023
by
Levin Zimmermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
cd5dcdb5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
fuse/server.go
fuse/server.go
+11
-3
No files found.
fuse/server.go
View file @
4f38a2d6
...
@@ -246,7 +246,17 @@ func NewServer(fs RawFileSystem, mountPoint string, opts *MountOptions) (*Server
...
@@ -246,7 +246,17 @@ func NewServer(fs RawFileSystem, mountPoint string, opts *MountOptions) (*Server
}
}
func
escapeComma
(
optionValue
string
)
string
{
func
escapeComma
(
optionValue
string
)
string
{
return
strings
.
Replace
(
optionValue
,
","
,
"//"
,
-
1
)
// What happens if the user already escaped the comma?
// (with something like fsname=my//,escapedoption)
//
// maybe
//
// strings.Replace(strings.Replace(optionValue, "//,", ",", -1), ",", "//,", -1)
//
// ?
//
// or should we simply accept this?
return
strings
.
Replace
(
optionValue
,
","
,
"//,"
,
-
1
)
}
}
func
(
o
*
MountOptions
)
optionsStrings
()
[]
string
{
func
(
o
*
MountOptions
)
optionsStrings
()
[]
string
{
...
@@ -274,8 +284,6 @@ func (o *MountOptions) optionsStrings() []string {
...
@@ -274,8 +284,6 @@ func (o *MountOptions) optionsStrings() []string {
// Commas in an option need to be escaped, because
// Commas in an option need to be escaped, because
// options are separated by a comma.
// options are separated by a comma.
var
rEscaped
[]
string
var
rEscaped
[]
string
bool
escape_ok
=
begins_with
(
s
,
fsname_str
)
||
begins_with
(
s
,
subtype_str
);
for
_
,
s
:=
range
r
{
for
_
,
s
:=
range
r
{
rEscaped
=
append
(
rEscaped
,
escapeComma
(
s
))
rEscaped
=
append
(
rEscaped
,
escapeComma
(
s
))
}
}
...
...
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