Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script does not handle Worlds with spaces #14

Closed
Jonek01 opened this issue Jun 4, 2012 · 1 comment
Closed

Script does not handle Worlds with spaces #14

Jonek01 opened this issue Jun 4, 2012 · 1 comment
Assignees
Labels

Comments

@Jonek01
Copy link

Jonek01 commented Jun 4, 2012

When world contains spaces, it randomly creates directories/not working when starting the server.
Not sure if i got all the places in this diff:

diff msm024 /etc/init.d/msm 
161c161
<       as_user ${server_user_name[${world_server_id[$1]}]} "mkdir -p ${world_ramdisk_path[$1]} && rsync -rt --exclude '$WORLD_FLAG_INRAM' \"${world_path[$1]}/\" \"${world_ramdisk_path[$1]}\""

---
>       as_user ${server_user_name[${world_server_id[$1]}]} "mkdir -p \"${world_ramdisk_path[$1]}\" && rsync -rt --exclude '$WORLD_FLAG_INRAM' \"${world_path[$1]}/\" \"${world_ramdisk_path[$1]}\""
378c378
<           if ${world_inram[$i]} && [ -L ${world_link[$i]} ]; then

---
>           if ${world_inram[$i]} && [ -L "${world_link[$i]}" ]; then
398c398
<           if [ -e ${world_ramdisk_path[$i]} ]; then

---
>           if [ -e "${world_ramdisk_path[$i]}" ]; then
1395,1396c1395,1396
<           local name=$(basename $path)
<           server_world_init $1 $id $name

---
>           local name=$(basename "$path")
>           server_world_init $1 $id "$name"
1413,1414c1413,1414
<           local name=$(basename $path)
<           server_world_init $1 $id $name

---
>           local name=$(basename "$path")
>           server_world_init $1 $id "$name"
1509c1509
<       local name=$(basename $path)

---
>       local name=$(basename "$path")
@marcuswhybrow
Copy link

Thanks for your help with the bugs @Jonek01, if you wish code changes like this to be attributed to your name (rather than me committing with reference to your help) the best thing to is to "fork" this repository to your github account, make the changes, and then send a "pull request" back to my repo. Read this to learn how to do that:

https://help.github.com/articles/fork-a-repo

This way your github account will be credited as a contributor to the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants