This is an automated email from the ASF dual-hosted git repository.
pearl11594 pushed a commit to branch 4.20
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.20 by this push:
new 789f94b664a VR: fix duplicated lines in .htaccess (#10254)
789f94b664a is described below
commit 789f94b664a62a9e5729dec6ba60849ed0e90964
Author: Wei Zhou <[email protected]>
AuthorDate: Fri Feb 14 14:57:48 2025 +0100
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')