file order

rails2
Espen Antonsen 2009-08-01 20:22:37 +02:00
parent b6d2102f68
commit dfe5a6f7ac
1 changed files with 2 additions and 1 deletions

View File

@ -7,7 +7,8 @@ module ScanFiles
def self.FullScan
prevalbum = ""
Find.find( APP_CONFIG[:photos_path] ).sort.each { |path|
dirs = Find.find( APP_CONFIG[:photos_path] )
dirs.sort.each { |path|
if File.file?(path) && [".jpeg", ".jpg", ".gif", ".png"].include?( File.extname(path) )
relpath = File.dirname( path ).sub(APP_CONFIG[:photos_path], '')
relfile = path.sub(APP_CONFIG[:photos_path], '')