* Normalize path * * Any paths inside the current folder will be normalized to relative paths (to current) * Other paths will be made absolute */
| 804 | * Other paths will be made absolute |
| 805 | */ |
| 806 | QString NormalizePath(QString path) |
| 807 | { |
| 808 | QDir a = QDir::currentPath(); |
| 809 | QString currentAbsolute = a.absolutePath(); |
| 810 | |
| 811 | QDir b(path); |
| 812 | QString newAbsolute = b.absolutePath(); |
| 813 | |
| 814 | if (newAbsolute.startsWith(currentAbsolute)) { |
| 815 | return a.relativeFilePath(newAbsolute); |
| 816 | } else { |
| 817 | return newAbsolute; |
| 818 | } |
| 819 | } |
| 820 | |
| 821 | static const QString BAD_WIN_CHARS = "<>:\"|?*\r\n"; |
| 822 | static const QString BAD_NTFS_CHARS = "<>:\"|?*"; |
no outgoing calls
no test coverage detected