mirror of
https://github.com/unraid/webgui.git
synced 2026-04-23 18:48:49 -05:00
bug fix: prevent deleting user template when (letter case) renaming a docker container
This commit is contained in:
@@ -584,7 +584,9 @@ if (isset($_POST['contName'])) {
|
||||
// force kill container if still running after 10 seconds
|
||||
removeContainer($existing,1);
|
||||
// remove old template
|
||||
@unlink("$userTmplDir/my-$existing.xml");
|
||||
if (strtolower($filename) != strtolower("$userTmplDir/my-$existing.xml")) {
|
||||
@unlink("$userTmplDir/my-$existing.xml");
|
||||
}
|
||||
}
|
||||
if ($startContainer) $cmd = str_replace('/docker create ', '/docker run -d ', $cmd);
|
||||
execCommand($cmd);
|
||||
|
||||
Reference in New Issue
Block a user