From 95a1263227fd6ebbaec5ae91ba52ff012ea82532 Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Thu, 23 Jan 2025 12:30:56 +0100 Subject: [PATCH] VR: fix duplicated lines in .htaccess --- 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 c68e4fde16b6..cf0b71ab436a 100755 --- a/systemvm/debian/opt/cloud/bin/configure.py +++ b/systemvm/debian/opt/cloud/bin/configure.py @@ -932,6 +932,7 @@ def __htaccess(self, ip, folder, file): 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 @@ def __htaccess(self, ip, folder, file): fh = open(htaccessFile, "a+") self.__exflock(fh) + fh.seek(0) if entry not in fh.read(): fh.write(entry + '\n')