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
16a99804
Commit
16a99804
authored
Apr 30, 2023
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/update/Archive: move check to IsAcceptableFilename()
parent
75a39ed2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
Archive.cxx
src/db/update/Archive.cxx
+8
-1
No files found.
src/db/update/Archive.cxx
View file @
16a99804
...
@@ -51,6 +51,13 @@ LockFindSong(Directory &directory, std::string_view name) noexcept
...
@@ -51,6 +51,13 @@ LockFindSong(Directory &directory, std::string_view name) noexcept
return
directory
.
FindSong
(
name
);
return
directory
.
FindSong
(
name
);
}
}
[[
gnu
::
pure
]]
static
bool
IsAcceptableFilename
(
std
::
string_view
name
)
noexcept
{
return
!
name
.
empty
();
}
void
void
UpdateWalk
::
UpdateArchiveTree
(
ArchiveFile
&
archive
,
Directory
&
directory
,
UpdateWalk
::
UpdateArchiveTree
(
ArchiveFile
&
archive
,
Directory
&
directory
,
const
char
*
name
)
noexcept
const
char
*
name
)
noexcept
...
@@ -65,7 +72,7 @@ UpdateWalk::UpdateArchiveTree(ArchiveFile &archive, Directory &directory,
...
@@ -65,7 +72,7 @@ UpdateWalk::UpdateArchiveTree(ArchiveFile &archive, Directory &directory,
//create directories first
//create directories first
UpdateArchiveTree
(
archive
,
*
subdir
,
tmp
+
1
);
UpdateArchiveTree
(
archive
,
*
subdir
,
tmp
+
1
);
}
else
{
}
else
{
if
(
StringIsEmpty
(
name
))
if
(
!
IsAcceptableFilename
(
name
))
return
;
return
;
//add file
//add 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