From ca72aa00be71fd10f03b2841b8af24c1390ff53f Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Thu, 30 Sep 2021 22:16:04 +0000 Subject: [PATCH] LazMapViewer: Make sure that the Cache path exists. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8107 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/lazmapviewer/source/mvengine.pas | 1 + components/lazmapviewer/source/mvmapviewer.pas | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/lazmapviewer/source/mvengine.pas b/components/lazmapviewer/source/mvengine.pas index a26685d8c..5400bc91a 100644 --- a/components/lazmapviewer/source/mvengine.pas +++ b/components/lazmapviewer/source/mvengine.pas @@ -1107,6 +1107,7 @@ end; procedure TMapViewerEngine.SetCachePath(AValue: String); begin + ForceDirectories(aValue); Cache.BasePath := aValue; end; diff --git a/components/lazmapviewer/source/mvmapviewer.pas b/components/lazmapviewer/source/mvmapviewer.pas index 829a3ab08..52095370f 100644 --- a/components/lazmapviewer/source/mvmapviewer.pas +++ b/components/lazmapviewer/source/mvmapviewer.pas @@ -384,7 +384,7 @@ end; procedure TMapView.SetCachePath(AValue: String); begin - Engine.CachePath := AValue; //CachePath; + Engine.CachePath := AValue; end; procedure TMapView.SetCenter(AValue: TRealPoint);