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
8536a979
Commit
8536a979
authored
Oct 09, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: delete directory after failed update
When a directory cannot be updated, there must be something wrong with it, and the database contains stale data. Remove it.
parent
0daba6bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
update.c
src/update.c
+8
-1
No files found.
src/update.c
View file @
8536a979
...
@@ -254,9 +254,16 @@ updateInDirectory(struct directory *directory, const char *name)
...
@@ -254,9 +254,16 @@ updateInDirectory(struct directory *directory, const char *name)
}
else
if
(
S_ISDIR
(
st
.
st_mode
))
{
}
else
if
(
S_ISDIR
(
st
.
st_mode
))
{
struct
directory
*
subdir
=
directory_get_child
(
directory
,
name
);
struct
directory
*
subdir
=
directory_get_child
(
directory
,
name
);
if
(
subdir
)
{
if
(
subdir
)
{
enum
update_return
ret
;
assert
(
directory
==
subdir
->
parent
);
assert
(
directory
==
subdir
->
parent
);
directory_set_stat
(
subdir
,
&
st
);
directory_set_stat
(
subdir
,
&
st
);
return
updateDirectory
(
subdir
);
ret
=
updateDirectory
(
subdir
);
if
(
ret
==
UPDATE_RETURN_ERROR
)
delete_directory
(
subdir
);
return
ret
;
}
else
{
}
else
{
return
addSubDirectoryToDirectory
(
directory
,
name
,
&
st
);
return
addSubDirectoryToDirectory
(
directory
,
name
,
&
st
);
}
}
...
...
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