Fix rsync command to exclude target directory to prevent copying into itself

- Added dynamic exclude for target directory in rsync command
- Uses f'--exclude={target_mount}' to exclude the target mount point
- This prevents rsync from trying to copy the target directory into itself
- Matches the behavior of the original auto-installer.sh script
- Ensures clean system copy without recursive target directory issues

This resolves potential issues where rsync might attempt to copy
the target directory into itself during the system copy process.
parent c3224f98
......@@ -725,8 +725,11 @@ class InstallerWorker(QThread):
self.log("Starting system copy with dynamic progress...")
# Use rsync with progress output for dynamic updates
# Exclude the target directory to prevent copying into itself
target_exclude = f'--exclude={target_mount}'
cmd = [
'rsync', '-av', '--progress', '--stats', '--human-readable',
target_exclude,
'--exclude=/proc', '--exclude=/sys', '--exclude=/dev',
'--exclude=/tmp', '--exclude=/run', '--exclude=/mnt',
'--exclude=/media', '--exclude=/lost+found',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment