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
78899051
Commit
78899051
authored
Oct 09, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: do the recursive directory check only once
The recursive checks were performed in several functions, and sometimes a directory was checked twice.
parent
a9799218
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
update.c
src/update.c
+6
-8
No files found.
src/update.c
View file @
78899051
...
...
@@ -235,9 +235,6 @@ addSubDirectoryToDirectory(struct directory *directory,
{
struct
directory
*
subDirectory
;
if
(
inodeFoundInParent
(
directory
,
st
->
st_ino
,
st
->
st_dev
))
return
UPDATE_RETURN_NOUPDATE
;
subDirectory
=
directory_new
(
name
,
directory
);
if
(
updateDirectory
(
subDirectory
,
st
)
!=
UPDATE_RETURN_UPDATED
)
{
directory_free
(
subDirectory
);
...
...
@@ -273,7 +270,12 @@ updateInDirectory(struct directory *directory,
return
UPDATE_RETURN_UPDATED
;
}
}
else
if
(
S_ISDIR
(
st
->
st_mode
))
{
struct
directory
*
subdir
=
directory_get_child
(
directory
,
name
);
struct
directory
*
subdir
;
if
(
inodeFoundInParent
(
directory
,
st
->
st_ino
,
st
->
st_dev
))
return
UPDATE_RETURN_ERROR
;
subdir
=
directory_get_child
(
directory
,
name
);
if
(
subdir
)
{
enum
update_return
ret
;
...
...
@@ -314,10 +316,6 @@ updateDirectory(struct directory *directory, const struct stat *st)
directory_set_stat
(
directory
,
st
);
if
(
inodeFoundInParent
(
directory
->
parent
,
directory
->
inode
,
directory
->
device
))
return
UPDATE_RETURN_ERROR
;
dir
=
opendir
(
opendir_path
(
path_max_tmp
,
dirname
));
if
(
!
dir
)
return
UPDATE_RETURN_ERROR
;
...
...
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