[Windows] Backups of worlds on other drives fail
FoxAmes opened this issue ยท 1 comments
Description
On Windows hosts, when a world folder exists on a different drive than the server root, backups fail to run. In my specific case, we host the world on a small SSD but keep the world configuration on a HDD due to budgetary restrictions.
Steps to Reproduce
Create a minecraft server on a Windows host, and change the world
in server.properties
to a path on another drive, e.g. D:\\minecraft\\world
. Start the server and attempt to run a backup.
Behavior
Backups fail to run, with an error similar to the following:
Expected Behavior
Backups should allow for worlds hosted on different drives, since this is a valid configuration for Minecraft Servers.
Analysis
This is caused by the use of path relativization in packing:
Since the root path passed in is determined to be the server root:
any files outside of this drive will fail to be added, causing the backup to fail.
Solutions
Using non-relative paths in backups would potentially solve this, but I imagine such a change would break a large number of workflows that automatically recover and rely on relative paths in a backup archive. Perhaps creating additional archives per-drive in the case of such a configuration is the easiest fix, I will attempt to create such a PR.