@@ -1270,7 +1270,8 @@ function update($event_name, $data) {
12701270 if ($ web_config ["website_symlinks_rel " ] == 'y ' ) {
12711271 $ this ->create_relative_link (escapeshellcmd ($ key_tmp_file ), escapeshellcmd ($ key_file ));
12721272 } else {
1273- exec ("ln -s " .escapeshellcmd ($ key_tmp_file )." " .escapeshellcmd ($ key_file ));
1273+ if (@is_link ($ key_file )) $ app ->system ->unlink ($ key_file );
1274+ if (@file_exists ($ key_tmp_file )) exec ("ln -s " .escapeshellcmd ($ key_tmp_file )." " .escapeshellcmd ($ key_file ));
12741275 }
12751276
12761277 if (is_file ($ crt_file )) {
@@ -1282,7 +1283,8 @@ function update($event_name, $data) {
12821283 if ($ web_config ["website_symlinks_rel " ] == 'y ' ) {
12831284 $ this ->create_relative_link (escapeshellcmd ($ crt_tmp_file ), escapeshellcmd ($ crt_file ));
12841285 } else {
1285- exec ("ln -s " .escapeshellcmd ($ crt_tmp_file )." " .escapeshellcmd ($ crt_file ));
1286+ if (@is_link ($ crt_file )) $ app ->system ->unlink ($ crt_file );
1287+ if (@file_exists ($ crt_tmp_file ))exec ("ln -s " .escapeshellcmd ($ crt_tmp_file )." " .escapeshellcmd ($ crt_file ));
12861288 }
12871289
12881290 if (is_file ($ bundle_file )) {
@@ -1294,7 +1296,8 @@ function update($event_name, $data) {
12941296 if ($ web_config ["website_symlinks_rel " ] == 'y ' ) {
12951297 $ this ->create_relative_link (escapeshellcmd ($ bundle_tmp_file ), escapeshellcmd ($ bundle_file ));
12961298 } else {
1297- exec ("ln -s " .escapeshellcmd ($ bundle_tmp_file )." " .escapeshellcmd ($ bundle_file ));
1299+ if (@is_link ($ bundle_file )) $ app ->system ->unlink ($ bundle_file );
1300+ if (@file_exists ($ bundle_tmp_file )) exec ("ln -s " .escapeshellcmd ($ bundle_tmp_file )." " .escapeshellcmd ($ bundle_file ));
12981301 }
12991302
13001303 /* we don't need to store it.
0 commit comments