Commit Graph

3483 Commits

Author SHA1 Message Date
mgutt
f105f35369 Enable parent-to-subdirectory check for rsync-rename moves
Prevents moving a directory into its own subdirectory, which would cause
rsync --backup-dir to create nested structures and fail to delete source.

Example prevented: /mnt/disk1/parent → /mnt/disk1/parent/subfolder

The check uses trailing slashes to ensure exact directory boundary matching
and prevent false positives (e.g., /parent vs /parent2).
2025-10-25 15:58:13 +02:00
mgutt
ef0be9c2b7 Rename $move to $delete_empty_dirs and add commented parent-to-subfolder check
- Renamed $move variable to $delete_empty_dirs for clearer intent
- Variable now only set to true for rsync copy-delete (not for rsync-rename)
- rsync-rename doesn't need cleanup since source is atomically moved
- Added commented code to prevent moving directory into its own subdirectory
2025-10-25 15:50:53 +02:00
mgutt
031b4bae9a Fix JSON array index bug in parse_rsync_progress()
Initialize text array as indexed array to prevent associative array
when only progress line is parsed. Ensures text[0] is always set,
avoiding JSON output like {"1":"..."} in WebGUI.
2025-10-25 13:52:41 +02:00
mgutt
be210fc701 Add minimum width guard to mb_strimhalf()
Prevent negative or zero values in $half calculation when $width < 8.
For small widths, simply truncate text without middle ellipsis.
2025-10-25 02:41:01 +02:00
mgutt
37e59b68e5 Fix file_manager bugs and migrate to JSON status format
Multiple improvements to file_manager reliability and status handling:

1. Fix rsync output parsing bug
   - rsync returns filename and progress lines in unpredictable order
   - Old JS parsing: text[1].split() assumed fixed line order
   - New approach: Simplified shell parsing (tail + tr) in PHP
   - parse_rsync_progress() helper function for consistent handling

2. Migrate status updates to JSON format
   - Structure: {action: int, text: [file_text, progress_text?]}
   - PHP: mb_strimhalf() for UTF-8-safe middle truncation
   - PHP: htmlspecialchars() escaping, JS adds icons client-side
   - Minimizes WebSocket overhead (no HTML in payload)
   - Universal handler in BrowseButton.page (6 lines)

3. Fix stale status messages (Nchan caching issue)
   - rc.nginx: nchan_message_timeout 30s for /pub/filemanager
   - Status expires automatically after 30s
   - Prevents displaying outdated progress status in footer

4. Remove obsolete move operation variants (case 5/10)
   - file_manager: Remove case 5/10 comments (mv-based move)
   - Browse.page: Remove action++ logic from doAction/doActions
   - BrowseButton.page: Remove case 5/10 from dfm_makeDialog()
   - All moves now use case 4/9 with automatic rsync-rename optimization
2025-10-25 02:27:00 +02:00
mgutt
69a21de7a4 file_manager: persist move state and handle restarts
- Initialize  outside the main loop to ensure correct state handling for move/cleanup phases
- If file_manager restarts and PID is loaded from file and move operation is still active, enable  to cleanup empty directories afterwards
- Clarify comment for INI job parameters
2025-10-24 13:26:10 +02:00
mgutt
77579fd0a5 Merge branch 'unraid:master' into optimize-file-manager-move 2025-10-24 12:27:59 +02:00
mgutt
6511029172 file_manager: use separate PID file instead of INI serialization
Replace complex INI serialization with simple separate .pid file:
- Avoids escaping issues (semicolons, hashes, newlines, etc.)
- No risk of INI file corruption
- Consistent with existing pattern (.active, .status, .error, .pid)
- Simpler code with fewer error sources
- Atomic writes (single number to file)
2025-10-24 04:21:46 +02:00
mgutt
fbcc3684c6 file_manager: remove redundant PID validation and persist PID to survive restarts 2025-10-24 04:06:01 +02:00
Squidly271
be16426033 Merge branch 'master' into patch-11 2025-10-22 17:19:09 -04:00
Squidly271
72e5bd4da7 Fix: wait time cutoff 2025-10-22 17:18:48 -04:00
tom mortensen
2fce67e2ad Merge pull request #2436 from SimonFair/Bug-Language-issue-for-bootvga-value-
Fix: bootvga  check.
2025-10-22 14:11:41 -07:00
tom mortensen
93ab3b1916 Merge pull request #2435 from Squidly271/patch-14
Fix: Unable to see radio boxes in tables on black
2025-10-22 14:11:17 -07:00
SimonFair
171c6f68a6 Fix bootvga check. 2025-10-22 21:16:43 +01:00
Squidly271
42f4e273eb Fix: Unable to see radio boxes in tables on black 2025-10-22 14:01:55 -04:00
Squidly271
55c3c7031a Fix: CPU pinning crashing if 3rd party container present 2025-10-22 13:28:18 -04:00
Squidly271
8227702a8f Fix: Font style when starting up containers 2025-10-22 13:08:33 -04:00
Squidly271
57a8d9f475 Capitalize title of sections and improve spacing 2025-10-21 18:01:29 -04:00
mgutt
2568736259 Escape rsync filter meta-characters and handle symlinked directories properly 2025-10-19 20:22:29 +02:00
mgutt
d37af270e5 Use device IDs instead of mount points for more robust filesystem comparison 2025-10-19 20:12:28 +02:00
mgutt
42d6622dea Add directory check for rsync rename optimization and suppress stderr from stat commands 2025-10-19 20:02:14 +02:00
mgutt
0b70940e15 Optimize file manager move operations on same filesystem 2025-10-19 19:04:36 +02:00
Tom Mortensen
a116309fdb Fix: SelfTest: remove text stating to disable spind down delay to run an extended self-test 2025-10-16 14:55:26 -07:00
tom mortensen
5dbe538f0e Merge pull request #2426 from Squidly271/patch-8
Fix: FF disabled menu item color
2025-10-16 13:26:14 -07:00
tom mortensen
c7324fd535 Merge pull request #2425 from SimonFair/Change-W11-VM-Defaults
Fix: Update VM page to show memory in GB if > 1024MB
2025-10-16 13:25:30 -07:00
Squidly271
66528c26a5 Sidebar 2025-10-16 09:46:33 -04:00
Squidly271
1940f8b363 Fix: FF disabled menu item color 2025-10-16 09:40:54 -04:00
SimonFair
52d55a2ebb Fix rounding.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-10-16 10:30:18 +01:00
SimonFair
5e4d04deae Fix: Update VM page to show memory in GB if > 1024MB 2025-10-16 10:23:18 +01:00
tom mortensen
ce4653aafb Merge pull request #2424 from SimonFair/Change-W11-VM-Defaults
Fix: set cd bus to sata for Win 11
2025-10-15 14:47:55 -07:00
tom mortensen
1ede0dd23c Merge pull request #2331 from bobbintb/vm-memory-slider
VM edit make RAM values human readable
2025-10-15 14:46:43 -07:00
SimonFair
0420111f92 Revert mk_options change. 2025-10-15 17:04:19 +01:00
SimonFair
d684cdd3de Merge remote-tracking branch 'upstream/master' into Change-W11-VM-Defaults 2025-10-15 16:28:45 +01:00
SimonFair
ca917c94cb remove code no longer required. 2025-10-15 16:25:43 +01:00
SimonFair
7d9f6e4a38 Fix: set cd bus to sata for Win 11 2025-10-15 12:54:35 +01:00
tom mortensen
1d24a6e6d7 Merge pull request #2423 from Squidly271/schedulehourly
Fix Display issue if schedule set to hourly
2025-10-14 21:12:53 -07:00
tom mortensen
f22fd5ba7a Merge pull request #2422 from Squidly271/7.3-pluginlogging
7.3 Adjust logging of inline FILE execution
2025-10-14 21:11:29 -07:00
tom mortensen
e31fda9099 Merge pull request #2421 from Squidly271/POC/safeeval
Refactor: Protect GUI from fatal PHP errors
2025-10-14 21:10:11 -07:00
tom mortensen
9e70f88bbb Merge pull request #2420 from Squidly271/Fix/VMSnapshot
Fix: Create snapshot display aberrations
2025-10-14 21:06:39 -07:00
tom mortensen
980cbf8e26 Merge pull request #2419 from SimonFair/Change-W11-VM-Defaults
Fix: Change Windows11 defaults
2025-10-14 21:05:53 -07:00
tom mortensen
d48d93823c Merge pull request #2418 from Squidly271/Feat/FocusFunc
Feat: Support Focus on page tabs
2025-10-14 21:05:02 -07:00
tom mortensen
75da9e0cdf Merge pull request #2416 from Squidly271/Chore/RemoveExtremeFontSizes
Chore: Only support small / normal / large font sizes
2025-10-14 17:33:31 -07:00
tom mortensen
b791921c8a Merge pull request #2415 from Squidly271/fix/VMtablesize
Fix:  Force VM Machines table resize if browser resized when not on tab
2025-10-14 17:32:26 -07:00
tom mortensen
ae845460da Merge pull request #2413 from SimonFair/Fix-Memory-reporting-error-1TiB
Feat: Update display of memory size and nic speeds to support higher sizes
2025-10-14 17:10:35 -07:00
Squidly271
d6f7b86c44 Fix Display issue if schedule set to hourly 2025-10-14 13:42:21 -04:00
Squidly271
3c71758fc1 Adjust logging of inline FILE execution 2025-10-14 13:25:32 -04:00
SimonFair
053c339039 Fix: coderabbit suggestion. 2025-10-14 11:12:10 +01:00
Squidly271
f053ef52e6 Coderabbit changes 2025-10-09 17:47:46 -04:00
Squidly271
de8974f6da Protect parsing headers of .page file
Simple protection -> assigns default in case of an error
2025-10-09 17:26:30 -04:00
Squidly271
31e4100387 Don't log silenced PHP warnings 2025-10-09 16:41:39 -04:00