~pvsr/qpm

28da46f2428755de991f550d9c8c977e5f997e8e — Peter Rice 4 days ago 5a1dbc9 master
disallow slashes in profile name
1 files changed, 3 insertions(+), 0 deletions(-)

M qpm/profiles.py
M qpm/profiles.py => qpm/profiles.py +3 -0
@@ 22,6 22,9 @@ class Profile:
        self.root = self.profile_dir / name

    def check(self) -> Optional["Profile"]:
        if "/" in self.name:
            error("profile name cannot contain slashes")
            return None
        if not self.profile_dir.resolve().is_dir():
            error(f"{self.profile_dir} is not a directory")
            return None