fix(files): dosya taşıma ve yapıştırma işlemlerinde hedef yolunu düzelt

Hedef yolu null veya undefined olduğunda işlemin erken sonlanmasını engeller.
Hedef etiketi eksik olduğunda "Home" varsayılan değerini kullanır ve
normalizePath işlemini boş string ile devam ettirir.
This commit is contained in:
2026-02-01 22:21:31 +03:00
parent 6ac608a0b1
commit e7aaea53ad

View File

@@ -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;