Commit 42cc62d
committed
fix(backup): detect S3 rclone backend by exact type, not substring
Addresses review feedback: S3 detection ran 'rclone config show easyengine | grep type' and substring-matched 's3', which (a) hardcoded the easyengine remote name and so missed any backend configured via a different rclone-path, and (b) could false-positive on any config line whose value merely contained 's3' (e.g. an endpoint host or a content type), wrongly enabling S3 multipart tuning on a non-S3 remote.
Extract detection into is_s3_remote(), which resolves the remote name from rclone-path and compares the backend's exact type value to s3. All S3-compatible providers (AWS, Spaces, Wasabi, MinIO, ...) use type = s3, so the exact match still covers them.1 parent 10876d9 commit 42cc62d
1 file changed
Lines changed: 24 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1356 | 1356 | | |
1357 | 1357 | | |
1358 | 1358 | | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
1359 | 1382 | | |
1360 | 1383 | | |
1361 | 1384 | | |
1362 | 1385 | | |
1363 | 1386 | | |
1364 | | - | |
1365 | | - | |
| 1387 | + | |
1366 | 1388 | | |
1367 | 1389 | | |
1368 | 1390 | | |
| |||
0 commit comments