* Normalize path * * Any paths inside the current folder will be normalized to relative paths (to current) * Other paths will be made absolute */
| 305 | * Other paths will be made absolute |
| 306 | */ |
| 307 | QString NormalizePath(QString path) |
| 308 | { |
| 309 | QDir a = QDir::currentPath(); |
| 310 | QString currentAbsolute = a.absolutePath(); |
| 311 | |
| 312 | QDir b(path); |
| 313 | QString newAbsolute = b.absolutePath(); |
| 314 | |
| 315 | if (newAbsolute.startsWith(currentAbsolute)) { |
| 316 | return a.relativeFilePath(newAbsolute); |
| 317 | } else { |
| 318 | return newAbsolute; |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | QString badFilenameChars = "\"\\/?<>:;*|!+\r\n"; |
| 323 |
no outgoing calls
no test coverage detected