Files
docker-cli/components/engine/utils
Tonis Tiigi d0a61e9c18 Improve ValidateContextDirectory error handling.
- Errors sent to the walker callback functions were ignored. This meant that
  one could get a panic when calling methods on a nil FileInfo object. For
  example when the file did not exists any more.

- Lstat calls inside walker callback are reduntant because walker already calls
  Lstat and passes the result to the callback.

- Error returned from filepath.Rel() can never be EACCES because it compares
  strings and does not care about actual files.

- If Matched() returns error then ValidateContextDirectory() must return error.
  Currently it still kept walking although the outcome was already known. 

- Function will now fail in case of unknown error(not EACCES nor ENOENT).
  Previous implementation did not make a clear decision about this (but 
  panicked because of the issues above).

Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
Upstream-commit: a8914293fbb1328f9a5c931bd51e34f5d6584e17
Component: engine
2014-09-16 19:17:34 +03:00
..
2013-11-07 12:27:33 -08:00
2014-08-13 15:18:15 -07:00
2014-06-10 10:02:00 -04:00
2014-08-13 15:18:15 -07:00