fix(py): FilesDriver prepare directory.

This commit is contained in:
KyMAN 2026-07-18 15:59:46 +02:00
parent efa9b8b965
commit 26a06d93bb
3 changed files with 16 additions and 2 deletions

View File

@ -61,7 +61,20 @@ class FilesDriver(FilesAbstract):
def make_directory(self:Self, path:str) -> bool:
try:
make_directory(path)
directory:str = ""
subdirectory:str
if path[1] == ":":
directory = path[0:2]
path = path[2:]
for subdirectory in path.split(self._slash):
if subdirectory:
directory += self._slash + subdirectory
if not path_exists(directory):
make_directory(directory)
return True
except Exception as exception:
self.anp.exception(exception, "anp_files_driver_make_directory_exception", {

View File

@ -22,6 +22,7 @@ class RE:
PYTHON_MODULES_PATH:REPattern = re_compile(r'[\/\\]python[0-9\.]+[\/\\]site-packages[\/\\]?$', RE_IGNORECASE)
ODBC_STRING_VARIABLE:REPattern = re_compile(r'\{([a-z_][a-z0-9_]*)\}|@([a-z0-9_]+)', RE_IGNORECASE)
SQLITE_COMMENTS:REPattern = re_compile(r'--[^\r\n]*|\/\*(?:[^\*]|\*+[^\/\*]|[\r\n]+)*\*+\/')
PATH_SPLIT:REPattern = re_compile(r'[\/\\]+')
# ORM
ORM_MAIN_BLOCKS:REPattern = re_compile(r'((?:(?!(?:(?:\r\n){2}|[\r\n]{2}))(?:.|[\r\n]))+)(?:(?:\r\n){2}|[\r\n]{2})((?:.+|[\r\n]+)+)')

View File

@ -8,7 +8,7 @@ Framework.
#!/bin/bash
apt update && apt -y upgrade && apt -y autoclean && apt -y autoremove
pyp3 install websockets selenium selenium-wire pyodbc --break-system-packages
pyp3 install websockets selenium selenium-wire pyodbc parsel setuptools==69.5.1 blinker==1.7.0 --break-system-packages
```