| Conditions | 5 |
| Total Lines | 17 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | #!/usr/bin/env python2 |
||
| 12 | def main(): |
||
| 13 | ssg_root = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) |
||
| 14 | max_path = "" |
||
| 15 | for dir_, _, files in os.walk(ssg_root): |
||
| 16 | for file_ in files: |
||
| 17 | path = os.path.relpath(os.path.join(dir_, file_), ssg_root) |
||
| 18 | if len(path) > len(max_path): |
||
| 19 | max_path = path |
||
| 20 | |||
| 21 | print("The longest file path is '%s' at %i characters." |
||
| 22 | % (max_path, len(max_path))) |
||
| 23 | |||
| 24 | if len(max_path) > MAX_PATH_LEN: |
||
| 25 | print("At least one file path is longer than %i characters. That may " |
||
| 26 | "be problematic on some platforms." % (MAX_PATH_LEN), |
||
| 27 | file=sys.stderr) |
||
| 28 | sys.exit(1) |
||
| 29 | |||
| 33 |