Os.stem, os.short_stem are bugged

Reporting a bug here again since I still can’t get M*crosoft to remove my shadowban on Gith*b…

Now that the new os2 was merged, the following functions fail with input like this:

os.      stem("./builder") // → returns ""
os.short_stem("./builder") // → returns ""

Previously, filepath.stem would return “builder” in such cases as expected.

Fixed. Tests added. Thanks for letting us know. :slight_smile:

2 Likes

Awesome. Thanks! I’ve found another bug in filepath package:

package bug

import "core:path/filepath"
import "core:fmt"

main :: proc() {
  dir := filepath.dir("../bin/ccs")
  fmt.println(dir) // Linux: ../bin
                   // Windows: .bin ← incorrect
}
1 Like

core:path/filepath regrettably only had tests for split before this integration effort, so that’s why these slipped through the net.

dir has been fixed, and tests added. Thank you again.

1 Like