|
|
@ -80,7 +80,7 @@ class ProjectNameWidget(QtWidgets.QDialog): |
|
|
|
errorMessage = "" |
|
|
|
if currentText == "": |
|
|
|
errorMessage = QtCore.QCoreApplication.translate("ProjectNameWidget", "Name must not be empty.") |
|
|
|
elif pathlib.PurePosixPath(path).match("/*"): |
|
|
|
elif pathlib.PurePosixPath(path).match("/*") or str(pathlib.PurePosixPath(path)).startswith("/"): |
|
|
|
errorMessage = QtCore.QCoreApplication.translate("ProjectNameWidget", "Name must be a relative path.") |
|
|
|
elif pathlib.PurePosixPath(path).match("../*") or pathlib.PurePosixPath(path).match("*..*"): |
|
|
|
errorMessage = QtCore.QCoreApplication.translate("ProjectNameWidget", "Moving to parent directory not allowed.") |
|
|
|