mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
rcutil: use realpath to normalize paths for config editing
Summary: This resolves symlinks recursively. Reviewed By: farnz Differential Revision: D7639180 fbshipit-source-id: 9f2d29090a63cf0dfc997ae1c84095a2defe329e
This commit is contained in:
parent
12466818bb
commit
99467186ae
@ -106,6 +106,7 @@ def editconfig(path, section, name, value):
|
||||
Try to edit the config in-place without breaking config file syntax for
|
||||
simple cases. Fallback to just append the new config.
|
||||
"""
|
||||
path = os.path.realpath(path)
|
||||
content = ''
|
||||
try:
|
||||
content = util.readfile(path)
|
||||
|
Loading…
Reference in New Issue
Block a user