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:
@@ -807,12 +807,12 @@
|
|||||||
const sourcePath = resolveEntryOriginalPath(source);
|
const sourcePath = resolveEntryOriginalPath(source);
|
||||||
const targetPath = resolveEntryOriginalPath(target);
|
const targetPath = resolveEntryOriginalPath(target);
|
||||||
|
|
||||||
if (!sourcePath || !targetPath) return;
|
if (!sourcePath || targetPath === undefined || targetPath === null) return;
|
||||||
|
|
||||||
const normalizedSource = normalizePath(sourcePath);
|
const normalizedSource = normalizePath(sourcePath);
|
||||||
const normalizedTarget = normalizePath(targetPath);
|
const normalizedTarget = normalizePath(targetPath || "");
|
||||||
|
|
||||||
if (!normalizedSource || !normalizedTarget) return;
|
if (!normalizedSource) return;
|
||||||
|
|
||||||
if (source?.isDirectory) {
|
if (source?.isDirectory) {
|
||||||
if (
|
if (
|
||||||
@@ -830,7 +830,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const sourceLabel = cleanFileName(source.displayName || source.name || normalizedSource);
|
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?`)) {
|
if (!confirm(`"${sourceLabel}" öğesini "${targetLabel}" içine taşımak istiyor musun?`)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1644,15 +1645,15 @@
|
|||||||
const sourcePath = resolveEntryOriginalPath(clipboardItem);
|
const sourcePath = resolveEntryOriginalPath(clipboardItem);
|
||||||
const targetPath = resolveOriginalPathForDisplay(currentPath, currentOriginalPath);
|
const targetPath = resolveOriginalPathForDisplay(currentPath, currentOriginalPath);
|
||||||
|
|
||||||
if (!sourcePath || !targetPath) {
|
if (!sourcePath || targetPath === undefined || targetPath === null) {
|
||||||
alert("Geçersiz kaynak veya hedef yolu");
|
alert("Geçersiz kaynak veya hedef yolu");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const normalizedSource = normalizePath(sourcePath);
|
const normalizedSource = normalizePath(sourcePath);
|
||||||
const normalizedTarget = normalizePath(targetPath);
|
const normalizedTarget = normalizePath(targetPath || "");
|
||||||
|
|
||||||
if (!normalizedSource || !normalizedTarget) {
|
if (!normalizedSource) {
|
||||||
alert("Geçersiz kaynak veya hedef yolu");
|
alert("Geçersiz kaynak veya hedef yolu");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1665,7 +1666,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const sourceLabel = cleanFileName(clipboardItem.displayName || clipboardItem.name || normalizedSource);
|
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';
|
const actionLabel = clipboardOperation === 'cut' ? 'taşı' : 'kopyala';
|
||||||
if (!confirm(`"${sourceLabel}" öğesini "${targetLabel}" konumuna ${actionLabel}mak istiyor musun?`)) {
|
if (!confirm(`"${sourceLabel}" öğesini "${targetLabel}" konumuna ${actionLabel}mak istiyor musun?`)) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user