| 163 | |
| 164 | |
| 165 | def validate_directory(source_root): |
| 166 | # For Python26 on Windows, passing an empty string equates to the |
| 167 | # current directory, which is not intended behavior. |
| 168 | if not source_root: |
| 169 | return False |
| 170 | # We walk the root because we want to validate there's at least one file |
| 171 | # that exists recursively from the root directory |
| 172 | for path, dirs, files in os.walk(source_root): |
| 173 | if files: |
| 174 | return True |
| 175 | return False |
| 176 | |
| 177 | |
| 178 | # TODO: Remove this class once available to CLI from s3transfer |