Commit 2e420db1 authored by Warren Dukes's avatar Warren Dukes

remove directory mtime from db!

also, only reReadDB and write DB on update if something was actually updated git-svn-id: https://svn.musicpd.org/mpd/trunk@780 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent 5ea8e2d6
1) non-blocking (for other clients) update
n) mpd command for rereading db
o) rewrite update functions to indicate if something was updated, then
when update process returns, indicate wheater db was updated
and should be reread by parent process
p) set error: in status when an error occurs during update
2) cleanup main()
......
......@@ -179,12 +179,11 @@ int hasMp3Suffix(char * utf8file) {
return hasSuffix(utf8file,"mp3");
}
int isDir(char * utf8name, time_t * mtime) {
int isDir(char * utf8name) {
struct stat st;
if(stat(rmp2amp(utf8ToFsCharset(utf8name)),&st)==0) {
if(S_ISDIR(st.st_mode)) {
if(mtime) *mtime = st.st_mtime;
return 1;
}
}
......
......@@ -28,7 +28,7 @@ int lsPlaylists(FILE * fp, char * utf8path);
int isFile(char * utf8file, time_t * mtime);
int isDir(char * utf8name, time_t * mtime);
int isDir(char * utf8name);
int isPlaylist(char * utf8file);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment