diff --git a/README.md b/README.md index 958247a..64ecd5a 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ my_datapack_title = 'My_Datapack' myDatapack = Datapack( title = my_datapack_title, + path='~\\home\\Vianpyro\\.minecraft\\saves\\world_42\\datapacks', author = 'Vianpyro', pack_meta = { 'minecraft_version': '1.16.4', diff --git a/wmcpy.py b/wmcpy.py index 08c0a17..d7d8931 100644 --- a/wmcpy.py +++ b/wmcpy.py @@ -21,7 +21,12 @@ def __init__(self, title, path=None, author="Vianpyro's datapack generator", pac self.title = title.lower() # Checking if the path given is valid. - self.path = '' if path is None else path + os.path.sep + if path is None: + self.path = '' + elif path[-1] == os.path.sep: + self.path = path + else: + self.path = path + os.path.sep # Is this datapack new? self.exists = os.path.exists(self.path + self.title)