mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Removing posible double '/' from the file paths
This commit is contained in:
parent
8b4f87f226
commit
e9919a913f
1 changed files with 4 additions and 0 deletions
|
@ -651,6 +651,10 @@ def diff(config='root', filename=None, num_pre=None, num_post=None):
|
|||
pre_file = os.path.normpath(pre_mount + "/" + _filepath)
|
||||
post_file = os.path.normpath(post_mount + "/" + _filepath)
|
||||
|
||||
# Just in case, removing posible double '/' from the final file paths
|
||||
pre_file = pre_file.replace("//", "/")
|
||||
post_file = post_file.replace("//", "/")
|
||||
|
||||
if os.path.isfile(pre_file):
|
||||
pre_file_exists = True
|
||||
pre_file_content = salt.utils.fopen(pre_file).readlines()
|
||||
|
|
Loading…
Add table
Reference in a new issue