summaryrefslogtreecommitdiff
path: root/build_db.plx
diff options
context:
space:
mode:
Diffstat (limited to 'build_db.plx')
-rwxr-xr-xbuild_db.plx3
1 files changed, 2 insertions, 1 deletions
diff --git a/build_db.plx b/build_db.plx
index 4f5bcad..945367f 100755
--- a/build_db.plx
+++ b/build_db.plx
@@ -20,6 +20,7 @@ our $table_name = "LIBRARY";
our $extensions_list = "flac,mp3,ogg";
our %extensions;
+# TODO add depth flag
# Keep track of options that have been set
our %options = (
append => 0,
@@ -61,7 +62,7 @@ sub get_files {
my $extensions = $_[1];
opendir my $dh, "$dir_path" or die "$!";
- while (my $file = readdir($dh)) {
+ foreach my $file(sort readdir($dh)) {
# Skip . and .. directories
if ($file eq "." or $file eq ".."){
next;