www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - The bug of the year

reply Basile B. <b2.temp gmx.com> writes:
I wanted to share this fun bug I had to deal with yesterday:

```
moduleFileBase_.buildPath(targetSymbolStack.joiner(".").array.to!string).setExtension("html");
```

you want `a/b.c.html` but you get `a/b.html`.

Have a nice day ;)
Jul 07 2022
parent Basile B. <b2.temp gmx.com> writes:
On Friday, 8 July 2022 at 05:41:46 UTC, Basile B. wrote:
 I wanted to share this fun bug I had to deal with yesterday:

 ```
 moduleFileBase_.buildPath(targetSymbolStack.joiner(".").array.to!string).setExtension("html");
 ```

 you want `a/b.c.html` but you get `a/b.html`.

 Have a nice day ;)
It's just that one must take care with `setExtension` as the file name may contains dots.`setExtension` implementation it's just fine IMO. Anyway it was just pure joy to find and fix this.
Jul 07 2022