Permalink
Browse files

ReadDir should give files in alphabetical order regardless of OS

  • Loading branch information...
1 parent b842f0c commit 135f5bfc255062e63bcb33593904e7b128106ca7 @bergie bergie committed Jun 5, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/components/ReadDir.coffee
@@ -22,6 +22,7 @@ class ReadDir extends noflo.Component
@outPorts.error.send err
return @outPorts.error.disconnect()
path = path.slice(0,-1) if path.slice(-1) == "/"
- @outPorts.out.send "#{path}/#{f}" for f in files
+ sortedFiles = files.sort()
+ @outPorts.out.send "#{path}/#{f}" for f in sortedFiles
exports.getComponent = -> new ReadDir()

0 comments on commit 135f5bf

Please sign in to comment.