Import statement needs .lua extension for paths containing `..`

,

With pdc, using the same Lua file, placed in two different locations relative to the current Lua file, this works:

import 'toyboxes/toyboxes'             -- WORKS!

while this doesn't find the file:

import '../toyboxes/toyboxes'             -- DOESN'T WORK

but this does:

import '../toyboxes/toyboxes.lua'     -- WORKS!
2 Likes

Whoa, that's weird. Thanks for catching that! It looks like it's related to Lua file seems to be imported multiple times though it doesn't appear to be the same bug, exactly.

1 Like

I've come across this one again with an import like this

import 'github.com/DidierMalenfant/pdbase/pdbase'

Looks like there is code just looking for a dot to see if the import ends with .lua, instead of checking for the full extension.