Please bear with me; I'm not very good at explaining things.
The game this problem was encountered on uses a text-file log system. All game events are written to text-files using the:
[file-object] << "text"
method.
I recently introduced a proc so coders can download session-logs (saved via dream-daemon->Log Session) from the server.
If the save-dialogue of dream-daemon->Log Session is open when a:
file(data/logs/[date].log) << "text"
is called, the file will be written to:
[currentdirectory being viewed by the dialogue]/data/logs/[date].log
rather than:
[where the .dmb is]/data/logs/[date].log
Numbered Steps to Reproduce Problem:
1) Start hosting the supplied code with dream-daemon
2) log session via dream-daemon. Navigate to somewhere and leave it open
3) Go in-game and do trigger the log_admin() verb.
4) focus on the dream-daemon save-dialogue. There will now be a data folder in there.
Code Snippet (if applicable) to Reproduce Problem:
/client/verb/log_admin(text)
diary << "\ADMIN: [text]"
/world/New()
..()
diary = file("data/logs/[time2text(world.realtime, "YYYY/MM-Month/DD-Day")].log")
diary << {"
Starting up. [time2text(world.timeofday, "hh:mm.ss")]
---------------------
"}
Expected Results:
For relative file-paths to save relative of the .dmb's location.
Actual Results:
relative file-paths save relative to the path being viewed by dream-daemon's dialogue
Does the problem occur:
Every time? Or how often? Every time
In other games?
In other user accounts? Yes
On other computers? yes, and different OS. Vista Home Basic and Windows Server 2008
When does the problem NOT occur?
when the dialogue is closed again.
when an absolute path such as /data/logs/whatever.log is used
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Unknown, I'll test a few and update this later.
Workarounds:
choose a location to save the session-log BEFORE hosting.
use an absolute path