From 4e55c481624482a5ca4af5a957a179d340bb13d3 Mon Sep 17 00:00:00 2001 From: Brian Pane Date: Sat, 14 Sep 2002 17:49:37 +0000 Subject: [PATCH] truncate existing file if "-c" is used git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96811 13f79535-47bb-0310-9956-ffa450edef68 --- support/htpasswd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/htpasswd.c b/support/htpasswd.c index 4e1d03b2c3..9864078705 100644 --- a/support/htpasswd.c +++ b/support/htpasswd.c @@ -566,7 +566,7 @@ int main(int argc, const char * const argv[]) * If we're not creating a new file, copy records from the existing * one to the temporary file until we find the specified user. */ - if (existing_file) { + if (existing_file && !(mask & APHTP_NEWFILE)) { if (apr_file_open(&fpw, pwfilename, APR_READ | APR_BUFFERED, APR_OS_DEFAULT, pool) != APR_SUCCESS) { apr_file_printf(errfile, "%s: unable to read file %s\n", -- 2.50.1