gulpjs/gulp — pull request #104 by nfroidure (2014-01-07 15:50:55+00:00)
Title: End dest stream only when underlying resources are closed

I found a very strange issue when comparing the result to the expected one here: https://github.com/nfroidure/gulp-iconfont/blob/master/tests/tests.mocha.js#L31 , it fails due to a different content.

I found this is due to the fact the system write was not completely performed when i tried to access the file content.

I think that continuing after a file.dest should be sure, that's why i suggest to wait the complete underlying resources close before passing the file throught and ending the file.dest returned stream.

The following change solves the issue.