Author Topic: *nix command 'ls' not working upon first logon  (Read 2989 times)

Offline Atomic

  • BFF
  • ***
  • Posts: 115
  • To infinity and beyond!
    • View Profile
*nix command 'ls' not working upon first logon
« on: March 07, 2007, 04:23:09 pm »
Thought I already mentioned this before, but just to be sure I'll do it again.
It seems as upon the first logon the unix/linux command 'ls' (and parameters -sla)
don't work.

They work as soon as the wizard (or administrator) has first initiated the
workroom-space.

See log below for what happened:
Code: [Select]
/realms/atomic/workroom
Atomic's workroom [e, d]
You are standing in the workroom of the mighty Atomic! 
You may return to the Creators' Hall by going down.
A sample room is east.
There is a sign here you can read.
There is a sheet here you can read.
A wooden chest and a recycling bin are here.

> ls

No current working directory.
> ls -sla

---
2007.03.07-20.56
*Value being indexed is zero.
Object: /secure/save/creators/a/atomic (/lib/files.c) at line 18

'<function>' at /secure/save/creators/a/atomic (<function>) at /:0
'cmdAll' at /secure/save/creators/a/atomic (/lib/command.c) at line 129
'cmd' at /secure/cmds/creators/ls at line 48
'wild_card' at /secure/save/creators/a/atomic (/lib/files.c) at line 18
Trace written to /log/runtime
home
You twitch.
> ls

No current working directory.
> home

You twitch.
> l

/realms/atomic/workroom
Atomic's workroom [e, d]
You are standing in the workroom of the mighty Atomic! 
You may return to the Creators' Hall by going down.
A sample room is east.
There is a sign here you can read.
There is a sheet here you can read.
A wooden chest and a recycling bin are here.


> save

Atomic is now saved.
> ls

No current working directory.
> cd

/realms/atomic:
> ls

/realms/atomic/:
     adm/                cmds/               tmp/           
     area/           1   customdefs.h    003 workroom.bak   
     bak/                log/           *003 workroom.c     


> ls -sla

/realms/atomic/:
   rw-  Wed Mar  7 20:56:01 2007       28       .plan
   rw-  Wed Mar  7 20:56:01 2007       21       .profile
   rw-  Wed Mar  7 20:56:01 2007       -2       adm/
   rw-  Wed Mar  7 20:56:01 2007       -2       area/
   rw-  Wed Mar  7 20:56:01 2007       -2       bak/
   rw-  Wed Mar  7 20:56:01 2007       -2       cmds/
   rw-  Wed Mar  7 20:56:01 2007       362      customdefs.h
   rw-  Wed Mar  7 20:56:01 2007       -2       log/
   rw-  Wed Mar  7 20:56:01 2007       -2       tmp/
   rw-  Wed Mar  7 20:56:01 2007       3087     workroom.bak
*  rw-  Wed Mar  7 20:56:01 2007       3087     workroom.c


>

Only seems to work correctly as expected after the first cd command.
 ???
Always remember that the early bird gets the worm first, but the fi...*SNAP*...second mouse gets the cheese.

Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1024
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Re: *nix command 'ls' not working upon first logon
« Reply #1 on: March 07, 2007, 04:26:57 pm »
I've added it to the buglist. Thank you for the detailed report!

-Crat

Offline Duuk

  • Acquaintance
  • *
  • Posts: 19
    • View Profile
Re: *nix command 'ls' not working upon first logon
« Reply #2 on: March 08, 2007, 11:37:43 pm »
Not really a bug.

When first promoted, creators don't have a current working directory.

Using "cd" sets your current working directory.

Possible workaround: Have a default cwd set in /lib/nmsh.c or in /lib/creator.c

Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1024
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Re: *nix command 'ls' not working upon first logon
« Reply #3 on: March 08, 2007, 11:39:54 pm »
It's addressed in 2.3a15, which will be out tonight or tomorrow.

See http://dead-souls.net/RELEASE_NOTES

-Crat