[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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user