View Issue Details

IDProjectCategoryView StatusLast Update
0000501LDMud 3.3Efunspublic2011-02-23 23:22
Reporterszalicil Assigned Tozesstra  
Status resolvedResolutionfixed 
Target Version3.3.720Fixed in Version3.3.720 
Summary0000501: get_dir("/",GETDIR_PATH)
Descriptionget_dir("/",GETDIR_PATH) returns filenames without the leading slash
[returns ({"tmp"})]
(get_dir("/anyfolder/",GETDIR_PATH) correctly returns paths starting with /
[returns ({"/tmp/somefile"})]
Steps To Reproduce#include <sys/files.h>
TagsNo tags attached.



2007-02-22 13:12

reporter   ~0000527

Please don't change this without option for enabling the original behaviour. Most muds take care of this and a change will break existing code.


2009-10-01 17:30

manager   ~0001396

I don't understand this. Why would you expect GETDIR_PATH to return the names without "/"? Isn't that what GETDIR_NAMES is for?


2009-10-03 09:43

reporter   ~0001436

In compat mode, get_dir(path, GETDIR_PATH) returns the path names without the leading slash. The behaviour that get_dir("/", GETDIR_PATH) works in native mode similar to compat mode, is a bug in my opinion. I personally expect get_dir() to return always paths with a leading slash.


2009-10-03 09:59

reporter   ~0001437

... when compiled in native mode! (forgot that part in my last note)


2009-10-03 18:39

administrator   ~0001442

I committed a fix for this in r2751 on trunk. "/" is prepended in plain mode also for the listing of the mudlib root directory, if paths are requested by GETDIR_PATH.
Now the interesting question: should I apply this for trunk-3.3 as well?


2009-10-03 18:47

reporter   ~0001443

I'd say, yes. When I see issue 0000684, it could happen that the mudlib itself will strip that fixed slash again.

Also apply a patch for 3.2, please!


2009-10-05 17:58

administrator   ~0001473

It is IMHO obvious, that this is a bug. And I think, it should be fixed. So I made a note in HISTORY and applied it in 3.3 as well in r2758.
I think, fixing it in 3.2 it currently not really necessary. 3.2 is anyway obsolete and I know only Coogan/Tubmus who still use the branch. And they use compat mode and will there be not affected by any patch.

Issue History

Date Modified Username Field Change
2007-02-21 12:44 szalicil New Issue
2007-02-22 13:12 peng Note Added: 0000527
2009-10-01 17:30 Gnomi Note Added: 0001396
2009-10-03 09:43 Coogan Note Added: 0001436
2009-10-03 09:59 Coogan Note Added: 0001437
2009-10-03 18:39 zesstra Note Added: 0001442
2009-10-03 18:39 zesstra Status new => assigned
2009-10-03 18:39 zesstra Assigned To => zesstra
2009-10-03 18:47 Coogan Note Added: 0001443
2009-10-05 17:58 zesstra Note Added: 0001473
2009-10-05 17:58 zesstra Status assigned => resolved
2009-10-05 17:58 zesstra Fixed in Version => 3.3.720
2009-10-05 17:58 zesstra Resolution open => fixed
2011-02-23 23:22 zesstra Target Version => 3.3.720