tvplanit: Fix BufDSDatastore to create DB directory if AutoCreate is true.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4802 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-06-22 13:37:24 +00:00
parent 78e60575cc
commit a4f762c4d4
3 changed files with 6 additions and 9 deletions

View File

@@ -99,7 +99,12 @@ begin
dir := IncludeTrailingPathDelimiter(FDirectory);
dir := ExpandFileName(dir);
if not DirectoryExistsUTF8(dir) then
raise Exception.CreateFmt('Directory "%s" for tables does not exist.', [dir]);
begin
if AutoCreate then
CreateDir(dir)
else
raise Exception.CreateFmt('Directory "%s" for tables does not exist.', [dir]);
end;
if ATableName = ResourceTableName then
table := FResourceTable