Fixed backups to be WorldEdit snapshot compatible.

I mistakenly thought WorldEdit wanted the zip to directly contain the
world files. In fact the zip should contain the directory itself.
This commit is contained in:
Marcus Whybrow 2012-05-31 04:51:42 +01:00
parent 406db34092
commit b27ced53ab

3
msm
View File

@ -183,7 +183,8 @@ world_backup() {
echo -n "Backing up world \"${world_name[$1]}\"... "
file_name="$(date "+%F-%H-%M-%S").zip"
as_user ${server_user_name[${world_server_id[$1]}]} "mkdir -p \"${world_backup_path[$1]}\" && cd \"${world_path[$1]}\" && zip -rq \"${world_backup_path[$1]}/${file_name}\" ."
local server_id=${world_server_id[$1]}
as_user ${server_user_name[$server_id]} "mkdir -p \"${world_backup_path[$1]}\" && cd \"${server_world_storage[$server_id]}\" && zip -rq \"${world_backup_path[$1]}/${file_name}\" ${world_name[$1]}"
echo "Done."
}