Code:
obj/HUD
Load
icon_state="load"
Click()
var/loading
for(var/R in flist("Savefiles/[usr.ckey]/"))
loading+="<a href=?action=load&load=[R]></a><br>"
if(!loading) {usr<<"You do not have any savefiles.";return}
loading+="<a href=?action=close&target=Load>Close</a>"
usr<<browse(loading,"window=Load,can_close=0,size=300x300")
/*client/Topic()
if("load")
if(!href_list["load"]) return
usr<<browse(null,"window=Load")
usr.client.LoadMob(href_list["load"])
client
proc
LoadMob(T as text)
if(!T) return
var/savefile/F=new("Savefiles/[mob.ckey]/[T]")
F["Mob"]>>mob
mob<<"Successfully loaded."*/
Problem description: Any savefiles that contain spaces, when the link to load them is clicked, everything freezes.
What you need to do is strip out only a trailing .sav from the filename, not just any period, a, s, or v. Clearly strip_text() is not what you need here.
Of course, one other simple option is to ckey-ify every savefile name, not just the directory.
Lummox JR