garden/tree — pull request #121 by tpatel (2012-06-12 22:06:32+00:00)
Title: Broken "cat" function

Hey guys,

I tried to call the "cat" function of the file tree's file system with curl :
```
pathToFile="/test/"
fileName="tester2"
curl -s -d "op=%22cat%22&path=%22$pathToFile$fileName%22" localhost/\$fs
```

And this was stopping the file tree with this king of error :
```
/home/tpatel/garden/tree/app.js:95
data.content = content;
^
ReferenceError: content is not defined
at /home/tpatel/garden/tree/app.js:95:26
at /home/tpatel/garden/tree/lib/fs.js:207:7
at [object Object]. (fs.js:123:5)
at [object Object].emit (events.js:64:17)
at Object.oncomplete (fs.js:1190:12)
```

So I'm proposing a fix to avoir this error : getting the content of the file from the driver.open function, by adding parameters in the callback.

However, this fix introduces a new problem : when you try to *cat* a file a long time after having opened it, the "content" attribute is null, that is to say it is not sent back to the user.