Skip unreadable local upload files
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
PLUGIN="u-navigator"
|
PLUGIN="u-navigator"
|
||||||
VERSION="2026.07.04.r002"
|
VERSION="2026.07.04.r003"
|
||||||
PKG_DIR="packages"
|
PKG_DIR="packages"
|
||||||
WORK_DIR=".plugin-build"
|
WORK_DIR=".plugin-build"
|
||||||
PKG_NAME="${PLUGIN}-${VERSION}.tgz"
|
PKG_NAME="${PLUGIN}-${VERSION}.tgz"
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -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 });
|
recordDebug('upload.file.done', { path: item.path, index: index + 1, total: uploadItems.length, overwrite: false });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.status !== 409) {
|
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, {
|
updateUploadTransfer(transfer, {
|
||||||
status: 'failed',
|
status: 'failed',
|
||||||
message: error.message || 'Upload fehlgeschlagen',
|
message: error.message || 'Upload fehlgeschlagen',
|
||||||
@@ -1108,6 +1123,12 @@ function uploadProgressPercent(transfer) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isLocalFileReadError(error) {
|
||||||
|
return error?.name === 'NotReadableError'
|
||||||
|
|| error?.name === 'NotFoundError'
|
||||||
|
|| error?.name === 'SecurityError';
|
||||||
|
}
|
||||||
|
|
||||||
function arrayBufferToBase64(buffer) {
|
function arrayBufferToBase64(buffer) {
|
||||||
const bytes = new Uint8Array(buffer);
|
const bytes = new Uint8Array(buffer);
|
||||||
let binary = '';
|
let binary = '';
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE PLUGIN [
|
<!DOCTYPE PLUGIN [
|
||||||
<!ENTITY name "u-navigator">
|
<!ENTITY name "u-navigator">
|
||||||
<!ENTITY author "Michael Roll">
|
<!ENTITY author "Michael Roll">
|
||||||
<!ENTITY version "2026.07.04.r002">
|
<!ENTITY version "2026.07.04.r003">
|
||||||
<!ENTITY package "&name;-&version;.tgz">
|
<!ENTITY package "&name;-&version;.tgz">
|
||||||
<!ENTITY pluginURL "https://git.casaderoll.de/michael/Unraid-Navigator/raw/branch/main/u-navigator.plg">
|
<!ENTITY pluginURL "https://git.casaderoll.de/michael/Unraid-Navigator/raw/branch/main/u-navigator.plg">
|
||||||
<!ENTITY support "https://git.casaderoll.de/michael/Unraid-Navigator">
|
<!ENTITY support "https://git.casaderoll.de/michael/Unraid-Navigator">
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
<FILE Name="/boot/config/plugins/&name;/&package;">
|
<FILE Name="/boot/config/plugins/&name;/&package;">
|
||||||
<URL>https://git.casaderoll.de/michael/Unraid-Navigator/raw/branch/main/packages/&package;</URL>
|
<URL>https://git.casaderoll.de/michael/Unraid-Navigator/raw/branch/main/packages/&package;</URL>
|
||||||
<MD5>9ccf5df46e9ceb52d5d90bd566f279fe</MD5>
|
<MD5>ee518cf2d919b9f7abfdf363109e3bff</MD5>
|
||||||
</FILE>
|
</FILE>
|
||||||
|
|
||||||
<FILE Run="/bin/bash">
|
<FILE Run="/bin/bash">
|
||||||
|
|||||||
Reference in New Issue
Block a user