* Normalize path * * Any paths inside the current folder will be normalized to relative paths (to current) * Other paths will be made absolute */
| 782 | * Other paths will be made absolute |
| 783 | */ |
| 784 | QString NormalizePath(QString path) |
| 785 | { |
| 786 | QDir a = QDir::currentPath(); |
| 787 | QString currentAbsolute = a.absolutePath(); |
| 788 | |
| 789 | QDir b(path); |
| 790 | QString newAbsolute = b.absolutePath(); |
| 791 | |
| 792 | if (newAbsolute.startsWith(currentAbsolute)) { |
| 793 | return a.relativeFilePath(newAbsolute); |
| 794 | } else { |
| 795 | return newAbsolute; |
| 796 | } |
| 797 | } |
| 798 | |
| 799 | static const QString BAD_WIN_CHARS = "<>:\"|?*\r\n"; |
| 800 | static const QString BAD_NTFS_CHARS = "<>:\"|?*"; |
no outgoing calls
no test coverage detected