diff --git a/client/src/routes/Files.svelte b/client/src/routes/Files.svelte index 7e8282d..a71a3d2 100644 --- a/client/src/routes/Files.svelte +++ b/client/src/routes/Files.svelte @@ -807,12 +807,12 @@ const sourcePath = resolveEntryOriginalPath(source); const targetPath = resolveEntryOriginalPath(target); - if (!sourcePath || !targetPath) return; + if (!sourcePath || targetPath === undefined || targetPath === null) return; const normalizedSource = normalizePath(sourcePath); - const normalizedTarget = normalizePath(targetPath); + const normalizedTarget = normalizePath(targetPath || ""); - if (!normalizedSource || !normalizedTarget) return; + if (!normalizedSource) return; if (source?.isDirectory) { if ( @@ -830,7 +830,8 @@ } const sourceLabel = cleanFileName(source.displayName || source.name || normalizedSource); - const targetLabel = cleanFileName(target.displayName || target.name || normalizedTarget); + const targetLabel = + cleanFileName(target.displayName || target.name || normalizedTarget) || "Home"; if (!confirm(`"${sourceLabel}" öğesini "${targetLabel}" içine taşımak istiyor musun?`)) { return; } @@ -1644,15 +1645,15 @@ const sourcePath = resolveEntryOriginalPath(clipboardItem); const targetPath = resolveOriginalPathForDisplay(currentPath, currentOriginalPath); - if (!sourcePath || !targetPath) { + if (!sourcePath || targetPath === undefined || targetPath === null) { alert("Geçersiz kaynak veya hedef yolu"); return; } const normalizedSource = normalizePath(sourcePath); - const normalizedTarget = normalizePath(targetPath); + const normalizedTarget = normalizePath(targetPath || ""); - if (!normalizedSource || !normalizedTarget) { + if (!normalizedSource) { alert("Geçersiz kaynak veya hedef yolu"); return; } @@ -1665,7 +1666,7 @@ } const sourceLabel = cleanFileName(clipboardItem.displayName || clipboardItem.name || normalizedSource); - const targetLabel = cleanFileName(currentPath || normalizedTarget); + const targetLabel = cleanFileName(currentPath || normalizedTarget) || "Home"; const actionLabel = clipboardOperation === 'cut' ? 'taşı' : 'kopyala'; if (!confirm(`"${sourceLabel}" öğesini "${targetLabel}" konumuna ${actionLabel}mak istiyor musun?`)) { return;