diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-10-11 20:41:55 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-10-12 05:27:32 -0700 |
commit | e28fb29349a811f0f306e9ac4bedf6013417d043 (patch) | |
tree | c28a33e1361a4a507dc2c401f4cce26eda7cd9aa /src/directory.h | |
parent | c6ee14dca5d7336dad20a6057aa2a8006d4447b8 (diff) | |
download | mpd-e28fb29349a811f0f306e9ac4bedf6013417d043.tar.gz mpd-e28fb29349a811f0f306e9ac4bedf6013417d043.tar.xz mpd-e28fb29349a811f0f306e9ac4bedf6013417d043.zip |
directory: make music_root global and avoid runtime initialization
mpd can't function without music_root; so don't bother
allocating it on the heap nor checking to see if it's
initialized.
Don't allow directory_new() to create a directory w/o a parent
or with an empty path, either: root is root and there can
be only one</highlander>.
Diffstat (limited to 'src/directory.h')
-rw-r--r-- | src/directory.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/directory.h b/src/directory.h index 546e55183..9c3063d75 100644 --- a/src/directory.h +++ b/src/directory.h @@ -43,6 +43,8 @@ struct directory { char path[mpd_sizeof_str_flex_array]; } mpd_packed; +extern struct directory music_root; + static inline int isRootDirectory(const char *name) { /* TODO: verify and remove !name check */ |