diff --git a/js/common/writePhetioHtaccess.js b/js/common/writePhetioHtaccess.js index 2fda4cf8..05239958 100644 --- a/js/common/writePhetioHtaccess.js +++ b/js/common/writePhetioHtaccess.js @@ -71,13 +71,17 @@ module.exports = async function writePhetioHtaccess( passwordProtectPath, latest // Use individual try/catch blocks to ensure atomic operations. try { - await fs.removeFileSync( wrapperHtaccessFullPath ); + await fs.unlinkSync( wrapperHtaccessFullPath ); + } + catch( e ) { + winston.debug( 'did not remove wrapper htaccess ' + e ); } - catch( e ) { /* don't worry about it */ } try { - await fs.removeFileSync( rootHtaccessFullPath ); + await fs.unlinkSync( rootHtaccessFullPath ); + } + catch( e ) { + winston.debug( 'did not remove root htaccess ' + e ); } - catch( e ) { /* don't worry about it */ } } else { try {