mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 23:25:43 -03:00
Handle when move to the current folder
This commit is contained in:
@@ -100,6 +100,12 @@ class MoveManager {
|
|||||||
targetPath = `${targetPath}/${newFolder}`;
|
targetPath = `${targetPath}/${newFolder}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// show toast if current path is same as target path
|
||||||
|
if (this.currentFilePath.substring(0, this.currentFilePath.lastIndexOf('/')) === targetPath) {
|
||||||
|
showToast('Model is already in the selected folder', 'info');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch('/api/move_model', {
|
const response = await fetch('/api/move_model', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|||||||
Reference in New Issue
Block a user