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
3e9ed15e
Commit
3e9ed15e
authored
Oct 13, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: added delete_name_in()
delete_name_in() is similar to delete_path(), but it does not need to look up the parent directory.
parent
69617438
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
update.c
src/update.c
+18
-1
No files found.
src/update.c
View file @
3e9ed15e
...
...
@@ -123,6 +123,23 @@ delete_directory(struct directory *directory)
directory_free
(
directory
);
}
static
void
delete_name_in
(
struct
directory
*
parent
,
const
char
*
name
)
{
struct
directory
*
directory
=
directory_get_child
(
parent
,
name
);
struct
song
*
song
=
songvec_find
(
&
parent
->
songs
,
name
);
if
(
directory
!=
NULL
)
{
delete_directory
(
directory
);
modified
=
true
;
}
if
(
song
!=
NULL
)
{
delete_song
(
parent
,
song
);
modified
=
true
;
}
}
struct
delete_data
{
char
*
tmp
;
struct
directory
*
dir
;
...
...
@@ -306,7 +323,7 @@ updateDirectory(struct directory *directory, const struct stat *st)
if
(
myStat
(
path_max_tmp
,
&
st2
)
==
0
)
updateInDirectory
(
directory
,
path_max_tmp
,
&
st2
);
else
delete_
path
(
path_max_tmp
);
delete_
name_in
(
directory
,
mpd_basename
(
path_max_tmp
)
);
}
closedir
(
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