1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/utils
Tonis Tiigi a8914293fb 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)
2014-09-16 19:17:34 +03:00
..
daemon.go go fmt 2013-11-07 12:27:33 -08:00
http.go Extract log utils into pkg/log 2014-08-13 15:18:15 -07:00
jsonmessage.go progress bar: don't strings.Repeat a negative number 2014-07-28 12:01:43 -04:00
jsonmessage_test.go jsonmessage: added test and cleaned up others 2014-07-28 14:43:28 -04:00
progressreader.go Fix io.Reader ambiguity on EOF in progressreader 2014-07-25 19:26:27 -04:00
random.go Fixed up if statement 2014-06-10 10:02:00 -04:00
stdcopy.go Extract log utils into pkg/log 2014-08-13 15:18:15 -07:00
streamformatter.go Remove unused and racy "used" param from streamformatter 2014-06-02 21:43:07 +04:00
streamformatter_test.go Remove unused and racy "used" param from streamformatter 2014-06-02 21:43:07 +04:00
timeoutconn.go Use Timeout Conn wrapper to set read deadline for downloading layer 2014-05-27 22:50:04 -07:00
timeoutconn_test.go utils: add test for TimeoutConn 2014-06-07 15:11:57 -07:00
tmpdir.go Docker should use /var/lib/container/tmp for large temporary files. 2014-08-05 16:43:42 -04:00
tmpdir_unix.go Docker should use /var/lib/container/tmp for large temporary files. 2014-08-05 16:43:42 -04:00
utils.go Improve ValidateContextDirectory error handling. 2014-09-16 19:17:34 +03:00
utils_test.go move some io related utils to pkg/ioutils 2014-09-03 11:36:21 +03:00