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
f0980283
Commit
f0980283
authored
Jan 08, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: include config.h, fix archive code
The archive code was disabled, because config.h was not included and thus ENABLE_ARCHIVE was not defined.
parent
7a9a1e3e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
update.c
src/update.c
+9
-6
No files found.
src/update.c
View file @
f0980283
...
...
@@ -25,6 +25,7 @@
#include "mapper.h"
#include "path.h"
#include "decoder_list.h"
#include "archive_list.h"
#include "playlist.h"
#include "event_pipe.h"
#include "notify.h"
...
...
@@ -33,6 +34,7 @@
#include "conf.h"
#include "stats.h"
#include "main.h"
#include "config.h"
#include <glib.h>
...
...
@@ -350,6 +352,9 @@ update_regular_file(struct directory *directory,
const
char
*
name
,
const
struct
stat
*
st
)
{
const
char
*
suffix
=
uri_get_suffix
(
name
);
#ifdef ENABLE_ARCHIVE
const
struct
archive_plugin
*
archive
;
#endif
if
(
suffix
==
NULL
)
return
;
...
...
@@ -376,9 +381,9 @@ update_regular_file(struct directory *directory,
#ifdef ENABLE_ARCHIVE
}
else
if
((
archive
=
archive_plugin_from_suffix
(
suffix
)))
{
struct
archive_file
*
archfile
;
char
pathname
[
MPD_PATH_MAX
]
;
char
*
pathname
;
map_directory_child_fs
(
directory
,
name
,
path
name
);
pathname
=
map_directory_child_fs
(
directory
,
name
);
//open archive
archfile
=
archive
->
open
(
pathname
);
if
(
archfile
)
{
...
...
@@ -404,6 +409,8 @@ update_regular_file(struct directory *directory,
}
else
{
g_warning
(
"unable to open archive %s"
,
pathname
);
}
g_free
(
pathname
);
#endif
}
}
...
...
@@ -415,10 +422,6 @@ static void
updateInDirectory
(
struct
directory
*
directory
,
const
char
*
name
,
const
struct
stat
*
st
)
{
#ifdef ENABLE_ARCHIVE
const
struct
archive_plugin
*
archive
;
#endif
assert
(
strchr
(
name
,
'/'
)
==
NULL
);
if
(
S_ISREG
(
st
->
st_mode
))
{
...
...
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