1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-10-05 03:33:09 +03:00

Fixed getting the network path

This commit is contained in:
Valery Sinelnikov
2024-10-10 18:33:00 +04:00
parent 862b3b358b
commit b3e222ae55
2 changed files with 5 additions and 4 deletions

View File

@@ -27,14 +27,15 @@ import smbc
from util.logging import log
from util.paths import file_cache_dir, file_cache_path_home, UNCPath
from util.exceptions import NotUNCPathError
from util.util import get_machine_name
class fs_file_cache:
__read_blocksize = 4096
def __init__(self, cache_name, username = None):
self.cache_name = cache_name
if username:
self.username = username
if username and username != get_machine_name():
try:
self.storage_uri = file_cache_path_home(username)
except:

View File

@@ -1,7 +1,7 @@
#
# GPOA - GPO Applier for Linux
#
# Copyright (C) 2019-2021 BaseALT Ltd. <org@basealt.ru>
# Copyright (C) 2019-2024 BaseALT Ltd. <org@basealt.ru>
# Copyright (C) 2019-2021 Igor Chudov <nir@nir.org.ru>
#
# This program is free software: you can redistribute it and/or modify
@@ -122,7 +122,7 @@ class UNCPath:
def get_uri(self):
path = self.path
if self.type == 'unc':
path = self.path.replace('\\', '/')
path = self.path.replace('\\\\', '/')
path = path.replace('//', 'smb://')
else:
pass