mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Use local instead of network
This commit is contained in:
parent
980d99d74b
commit
8dd6710b93
1 changed files with 6 additions and 3 deletions
|
@ -72,14 +72,17 @@ def _checksum_file_path(path):
|
|||
os.path.splitdrive(path)[-1].lstrip('/\\'),
|
||||
)
|
||||
except ValueError as exc:
|
||||
# The path is on a network drive (Windows)
|
||||
# The path is on a different drive (Windows)
|
||||
if 'path is on drive' in exc.message:
|
||||
drive, path = os.path.splitdrive(path)
|
||||
relpath = salt.utils.path_join(
|
||||
'network',
|
||||
os.path.splitdrive(path)[-1].lstrip('/\\'),
|
||||
'local',
|
||||
drive.rstrip(':'),
|
||||
path.lstrip('/\\'),
|
||||
)
|
||||
else:
|
||||
raise
|
||||
log.debug('Found path: %s', relpath)
|
||||
return salt.utils.path_join(__opts__['cachedir'], 'archive_hash', relpath)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue