This cannot be fixed. We need to convert the output directory path to use variables to make it work when restoring the backup on a different folder / server.
Moreover, your issue is extremely rare and easy to work around.
It's rare because most sites use a site folder name similar to public_html, htdocs, www and so on. It's extremely rare that the host uses a different convention and even more rare that someone would host multiple sites under the same account AND choose to name the backup directories using the same prefix as the site's root.
It's easy to work around by renaming your backup output directories. One idea is to create a backups folder with one subdirectory per site you are backing up.
In short, what you are experiencing does happen but we won't fix it. Fixing it would break a far more important feature (automatically convert output directory paths to use variables). Trying to work around this by doing path splitting and tree comparisons is not only slower, it also causes problems on Windows where both / and \ are valid path separators BUT the special prefix \\ means something else entirely (UNC path). In other words, the "better" fix would break backups on sites which are hosted on UNC paths which is more common and far more important than the backup output directory naming.
All things considered, we are not going to address this issue. We are aware of it but we'd rather have an extremely rare and easy to work around issue than a fundamental issue which would break backups for far more people without any possible workaround.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!