Skip unreadable local upload files

This commit is contained in:
Mikei386
2026-07-04 10:18:04 +02:00
parent 2e5581a6e9
commit 4e05ef3a8b
5 changed files with 24 additions and 3 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
set -eu
PLUGIN="u-navigator"
VERSION="2026.07.04.r002"
VERSION="2026.07.04.r003"
PKG_DIR="packages"
WORK_DIR=".plugin-build"
PKG_NAME="${PLUGIN}-${VERSION}.tgz"
Binary file not shown.
Binary file not shown.
+21
View File
@@ -952,6 +952,21 @@ async function uploadFileList(win, files, targetPath) {
recordDebug('upload.file.done', { path: item.path, index: index + 1, total: uploadItems.length, overwrite: false });
} catch (error) {
if (error.status !== 409) {
if (isLocalFileReadError(error)) {
updateUploadTransfer(transfer, {
skippedFiles: transfer.skippedFiles + 1,
skippedBytes: transfer.skippedBytes + Number(item.file.size || 0),
currentFile: item.path,
progress: uploadProgressPercent(transfer)
}, true);
recordDebug('upload.file.unreadable', {
path: item.path,
index: index + 1,
total: uploadItems.length,
error: serializeError(error)
});
continue;
}
updateUploadTransfer(transfer, {
status: 'failed',
message: error.message || 'Upload fehlgeschlagen',
@@ -1108,6 +1123,12 @@ function uploadProgressPercent(transfer) {
return 0;
}
function isLocalFileReadError(error) {
return error?.name === 'NotReadableError'
|| error?.name === 'NotFoundError'
|| error?.name === 'SecurityError';
}
function arrayBufferToBase64(buffer) {
const bytes = new Uint8Array(buffer);
let binary = '';
+2 -2
View File
@@ -1,7 +1,7 @@
<!DOCTYPE PLUGIN [
<!ENTITY name "u-navigator">
<!ENTITY author "Michael Roll">
<!ENTITY version "2026.07.04.r002">
<!ENTITY version "2026.07.04.r003">
<!ENTITY package "&name;-&version;.tgz">
<!ENTITY pluginURL "https://git.casaderoll.de/michael/Unraid-Navigator/raw/branch/main/u-navigator.plg">
<!ENTITY support "https://git.casaderoll.de/michael/Unraid-Navigator">
@@ -24,7 +24,7 @@
<FILE Name="/boot/config/plugins/&name;/&package;">
<URL>https://git.casaderoll.de/michael/Unraid-Navigator/raw/branch/main/packages/&package;</URL>
<MD5>9ccf5df46e9ceb52d5d90bd566f279fe</MD5>
<MD5>ee518cf2d919b9f7abfdf363109e3bff</MD5>
</FILE>
<FILE Run="/bin/bash">