Sort files in send queue.

This commit is contained in:
Martin Edenhofer 2013-06-17 13:00:26 +02:00
parent 790ed455f7
commit 81dbbdbfcb

View file

@ -265,11 +265,17 @@ module Session
def self.queue( client_id )
path = @path + '/' + client_id.to_s + '/'
data = []
Dir.foreach( path ) do |entry|
files = []
Dir.foreach( path ) {|entry|
next if entry == '.' || entry == '..'
files.push entry
}
files.sort.each {|entry|
filename = path + '/' + entry
if /^send/.match( entry )
data.push Session.queue_file( path, entry )
end
end
}
return data
end