Permalink
Browse files

No longer die on broken symlinks. (Fixes issue #36)

- Fix indentation on server/project.js.
  • Loading branch information...
1 parent c1a9df7 commit 87f3b9c235c763e9d93f86d0b791c60a31b5b47f @coreh coreh committed Jan 7, 2012
Showing with 18 additions and 11 deletions.
  1. +18 −11 server/project.js
View
@@ -150,22 +150,29 @@ exports.list = function(noCache) {
children: {}
}
dive(process.cwd(), { recursive: true, all: true, directories: true },
- function(err, path) {
- if (err) throw err
+ function(err, path) {
+ if (err) {
+ console.warn(err);
+ return
+ }
- fs.stat(path, function(err, stats) {
- if (err) throw err
+ fs.stat(path, function(err, stats) {
+ if (err) {
+ console.warn(err)
+ return
+ }
- if (stats.isFile())
- addToListCache(path)
- else
- addToListCache(path + "/.")
- })
+ if (stats.isFile()) {
+ addToListCache(path)
+ } else {
+ addToListCache(path + "/.")
+ }
+ })
}, function() {
- ee.emit('success', listCache)
+ ee.emit('success', listCache)
})
} else {
- process.nextTick(function() {
+ process.nextTick(function() {
ee.emit('success', listCache)
})
}

0 comments on commit 87f3b9c

Please sign in to comment.