This commit is contained in:
Raykov-MS 2026-07-06 22:45:05 +03:00
parent 400a218fc7
commit 12ad103a00

View File

@ -5,6 +5,7 @@ from dataclasses import dataclass
from datetime import datetime from datetime import datetime
from pathlib import Path from pathlib import Path
from urllib.parse import urlparse from urllib.parse import urlparse
from uuid import uuid4
from .config import ( from .config import (
build_date_parts, build_date_parts,
@ -199,7 +200,7 @@ def check_network_dir_access(
def check_dir_write_access( def check_dir_write_access(
target_dir: str, samba_conn, source_name: str target_dir: str, samba_conn, source_name: str
) -> tuple[bool, str | None]: ) -> tuple[bool, str | None]:
probe_prefix = f".sfm_write_probe_{int(datetime.now().timestamp() * 1000)}" probe_prefix = f".sfm_write_probe_{uuid4().hex}"
probe_src = join_path(target_dir, f"{probe_prefix}.tmp") probe_src = join_path(target_dir, f"{probe_prefix}.tmp")
probe_dst = join_path(target_dir, f"{probe_prefix}_renamed.tmp") probe_dst = join_path(target_dir, f"{probe_prefix}_renamed.tmp")