Skip to content

Commit

Permalink
VR: fix duplicated lines in .htaccess (#10254)
Browse files Browse the repository at this point in the history
  • Loading branch information
weizhouapache authored Feb 14, 2025
1 parent 5204960 commit 789f94b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions systemvm/debian/opt/cloud/bin/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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')

Expand Down

0 comments on commit 789f94b

Please sign in to comment.