Sort files in send queue.
This commit is contained in:
parent
790ed455f7
commit
81dbbdbfcb
1 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue