diff --git a/fdroidserver/common.py b/fdroidserver/common.py index ed567af8..df7c4905 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -123,7 +123,7 @@ def write_password_file(pwtype, password=None): command line argments ''' filename = '.fdroid.' + pwtype + '.txt' - fd = os.open(filename, os.O_CREAT | os.O_WRONLY, 0600) + fd = os.open(filename, os.O_CREAT | os.O_TRUNC | os.O_WRONLY, 0600) if password == None: os.write(fd, config[pwtype]) else: