saltstack/salt — pull request #6050 by terminalmage (2013-07-08 19:51:47+00:00)
Title: Fix issue with cp.get_dir copying more than intended

The get_dir member function of the salt fileclient was doing a simple
check to see if the path of a target file (or empty dir) started with
the specified salt:// path. As a result, salt://foo would match files
like salt://foo.sh or files within the directory salt://foobar/.

This commit adds a check to ensure that these undesired files/dirs are
not considered a match by the fileclient, and thus do not get
copied/replicated on the minion.

Fixes #6048.