Skip to content

Commit 789f94b

Browse files
VR: fix duplicated lines in .htaccess (#10254)
1 parent 5204960 commit 789f94b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

systemvm/debian/opt/cloud/bin/configure.py

+2
Original file line numberDiff line numberDiff line change
@@ -932,6 +932,7 @@ def __htaccess(self, ip, folder, file):
932932
if os.path.exists(htaccessFile):
933933
fh = open(htaccessFile, "a+")
934934
self.__exflock(fh)
935+
fh.seek(0)
935936
if entry not in fh.read():
936937
fh.write(entry + '\n')
937938
self.__unflock(fh)
@@ -969,6 +970,7 @@ def __htaccess(self, ip, folder, file):
969970

970971
fh = open(htaccessFile, "a+")
971972
self.__exflock(fh)
973+
fh.seek(0)
972974
if entry not in fh.read():
973975
fh.write(entry + '\n')
974976

0 commit comments

Comments
 (0)