diff options
author | Max Kellermann <max@duempel.org> | 2014-02-24 21:17:06 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-24 21:17:06 +0100 |
commit | 55cd5a9a7894a0b92d321721ce8c049cfd4b5112 (patch) | |
tree | 3cd8719375e68eddbaa99cd2f21b65e153d64202 /src/db | |
parent | 3f4c283203aa9cacf4ce43632d436805d854f3a3 (diff) | |
download | mpd-55cd5a9a7894a0b92d321721ce8c049cfd4b5112.tar.gz mpd-55cd5a9a7894a0b92d321721ce8c049cfd4b5112.tar.xz mpd-55cd5a9a7894a0b92d321721ce8c049cfd4b5112.zip |
DirectorySave: save the mtime only if it is known
Diffstat (limited to 'src/db')
-rw-r--r-- | src/db/DirectorySave.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/db/DirectorySave.cxx b/src/db/DirectorySave.cxx index 499f84734..614473d34 100644 --- a/src/db/DirectorySave.cxx +++ b/src/db/DirectorySave.cxx @@ -43,8 +43,9 @@ void directory_save(FILE *fp, const Directory &directory) { if (!directory.IsRoot()) { - fprintf(fp, DIRECTORY_MTIME "%lu\n", - (unsigned long)directory.mtime); + if (directory.mtime != 0) + fprintf(fp, DIRECTORY_MTIME "%lu\n", + (unsigned long)directory.mtime); fprintf(fp, "%s%s\n", DIRECTORY_BEGIN, directory.GetPath()); } |