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
1873c675
Commit
1873c675
authored
Feb 07, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FileCommands: use Storage::MapFS() instead of map_uri_fs()
parent
8fd8f23a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
FileCommands.cxx
src/command/FileCommands.cxx
+11
-5
No files found.
src/command/FileCommands.cxx
View file @
1873c675
...
...
@@ -31,7 +31,7 @@
#include "tag/TagId3.hxx"
#include "TagStream.hxx"
#include "TagFile.hxx"
#include "
Mapper
.hxx"
#include "
storage/StorageInterface
.hxx"
#include "fs/AllocatedPath.hxx"
#include "ls.hxx"
...
...
@@ -143,7 +143,16 @@ handle_read_comments(Client &client, gcc_unused int argc, char *argv[])
return
read_stream_comments
(
client
,
uri
);
}
else
if
(
!
PathTraitsUTF8
::
IsAbsolute
(
uri
))
{
#ifdef ENABLE_DATABASE
AllocatedPath
path_fs
=
map_uri_fs
(
uri
);
const
Storage
*
storage
=
client
.
GetStorage
();
if
(
storage
==
nullptr
)
{
#endif
command_error
(
client
,
ACK_ERROR_NO_EXIST
,
"No database"
);
return
CommandResult
::
ERROR
;
#ifdef ENABLE_DATABASE
}
AllocatedPath
path_fs
=
storage
->
MapFS
(
uri
);
if
(
path_fs
.
IsNull
())
{
command_error
(
client
,
ACK_ERROR_NO_EXIST
,
"No such file"
);
...
...
@@ -151,9 +160,6 @@ handle_read_comments(Client &client, gcc_unused int argc, char *argv[])
}
return
read_file_comments
(
client
,
path_fs
);
#else
command_error
(
client
,
ACK_ERROR_NO_EXIST
,
"No database"
);
return
CommandResult
::
ERROR
;
#endif
}
else
{
command_error
(
client
,
ACK_ERROR_NO_EXIST
,
"No such file"
);
...
...
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