From 789f94b664a62a9e5729dec6ba60849ed0e90964 Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Fri, 14 Feb 2025 14:57:48 +0100 Subject: [PATCH] VR: fix duplicated lines in .htaccess (#10254) --- systemvm/debian/opt/cloud/bin/configure.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/systemvm/debian/opt/cloud/bin/configure.py b/systemvm/debian/opt/cloud/bin/configure.py index c68e4fde16b..cf0b71ab436 100755 --- a/systemvm/debian/opt/cloud/bin/configure.py +++ b/systemvm/debian/opt/cloud/bin/configure.py @@ -932,6 +932,7 @@ class CsVmMetadata(CsDataBag): if os.path.exists(htaccessFile): fh = open(htaccessFile, "a+") self.__exflock(fh) + fh.seek(0) if entry not in fh.read(): fh.write(entry + '\n') self.__unflock(fh) @@ -969,6 +970,7 @@ class CsVmMetadata(CsDataBag): fh = open(htaccessFile, "a+") self.__exflock(fh) + fh.seek(0) if entry not in fh.read(): fh.write(entry + '\n')