* Normalize path * * Any paths inside the current folder will be normalized to relative paths (to current) * Other paths will be made absolute */
| 282 | * Other paths will be made absolute |
| 283 | */ |
| 284 | QString NormalizePath(QString path) |
| 285 | { |
| 286 | QDir a = QDir::currentPath(); |
| 287 | QString currentAbsolute = a.absolutePath(); |
| 288 | |
| 289 | QDir b(path); |
| 290 | QString newAbsolute = b.absolutePath(); |
| 291 | |
| 292 | if (newAbsolute.startsWith(currentAbsolute)) |
| 293 | { |
| 294 | return a.relativeFilePath(newAbsolute); |
| 295 | } |
| 296 | else |
| 297 | { |
| 298 | return newAbsolute; |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | QString badFilenameChars = "\"\\/?<>:;*|!+\r\n"; |
| 303 |
no outgoing calls
no test coverage detected