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
142d1951
Commit
142d1951
authored
Sep 28, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage/nfs: move code to UriToNfsPath()
parent
cf06ba6d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
NfsStorage.cxx
src/storage/plugins/NfsStorage.cxx
+13
-6
No files found.
src/storage/plugins/NfsStorage.cxx
View file @
142d1951
...
...
@@ -79,6 +79,17 @@ public:
virtual
const
char
*
MapToRelativeUTF8
(
const
char
*
uri_utf8
)
const
override
;
};
static
std
::
string
UriToNfsPath
(
const
char
*
uri_utf8
)
{
std
::
string
path
(
uri_utf8
);
/* libnfs paths must begin with a slash */
path
.
insert
(
path
.
begin
(),
'/'
);
return
path
;
}
std
::
string
NfsStorage
::
MapUTF8
(
const
char
*
uri_utf8
)
const
{
...
...
@@ -124,9 +135,7 @@ bool
NfsStorage
::
GetInfo
(
const
char
*
uri_utf8
,
gcc_unused
bool
follow
,
FileInfo
&
info
,
Error
&
error
)
{
/* libnfs paths must begin with a slash */
std
::
string
path
(
uri_utf8
);
path
.
insert
(
path
.
begin
(),
'/'
);
const
std
::
string
path
=
UriToNfsPath
(
uri_utf8
);
return
::
GetInfo
(
ctx
,
path
.
c_str
(),
info
,
error
);
}
...
...
@@ -134,9 +143,7 @@ NfsStorage::GetInfo(const char *uri_utf8, gcc_unused bool follow,
StorageDirectoryReader
*
NfsStorage
::
OpenDirectory
(
const
char
*
uri_utf8
,
Error
&
error
)
{
/* libnfs paths must begin with a slash */
std
::
string
path
(
uri_utf8
);
path
.
insert
(
path
.
begin
(),
'/'
);
const
std
::
string
path
=
UriToNfsPath
(
uri_utf8
);
nfsdir
*
dir
;
int
result
=
nfs_opendir
(
ctx
,
path
.
c_str
(),
&
dir
);
...
...
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