[CAM] Make sure CAMAsset location exists (#23618)

* Fixes #22858

Ensure that the default CAM asset location exists and is created in the user data location

* Update src/Mod/CAM/Path/Preferences.py

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
This commit is contained in:
sliptonic
2025-09-03 15:32:33 -05:00
committed by GitHub
parent d18e8192eb
commit 1ca81099d4

View File

@@ -114,9 +114,11 @@ def getBuiltinToolBitPath() -> pathlib.Path:
return getBuiltinAssetPath() / "Bit"
def getDefaultAssetPath():
config = pathlib.Path(FreeCAD.ConfigGet("UserConfigPath"))
return config / "CamAssets"
def getDefaultAssetPath() -> Path:
data_dir = pathlib.Path(FreeCAD.getUserAppDataDir())
asset_path = data_dir / "CamAssets"
asset_path.mkdir(parents=True, exist_ok=True)
return asset_path
def getAssetPath() -> pathlib.Path: