| Summary: | Trying to set file contents on a folder crashes server | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Michael Rennie <Michael_Rennie> |
| Component: | Node | Assignee: | Michael Rennie <Michael_Rennie> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | ||
| Version: | 15.0 | ||
| Target Milestone: | 17.0 | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| See Also: | https://github.com/eclipse/orion.client/pull/213 | ||
| Whiteboard: | |||
GitHub Pull Request 213 created by [mrennie] https://github.com/eclipse/orion.client/pull/213 Merged. |
Consider the following unit test: it('write file contents to directory', function(done) { request() .post(PREFIX + '/project') .type('json') .send({Name: 'testDir', Directory: true}) .expect(201) .end(function(err, res) { testHelper.throwIfError(err); request() .put(res.body.Location) .send('directory contents') .expect(400) .end(function(err, res) { testHelper.throwIfError(err); }); }) }); The result is the server barfs: [2017-10-05 13:41:16.084] [ERROR] file - { Error: EISDIR: illegal operation on a directory, open '/Users/mrennie/git/orion.client/modules/orionode/test/support/.test_workspace/project/testDir/' at Error (native) errno: -21, code: 'EISDIR', syscall: 'open', path: '/Users/mrennie/git/orion.client/modules/orionode/test/support/.test_workspace/project/testDir/' }