You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the main issue is that the directory is not seen as a directory, and thats why it doesn't keep going to the other files.
package main
import"core:path/filepath"import"core:fmt"import"core:os"
main :: proc() {
filepath.walk(
".",
proc(info: os.File_Info, in_err: os.Errno, user_data: rawptr) -> (err: os.Errno, skip_dir: bool) {
// We only get here once, with the root directory, even though there are more files.assert(err == os.ERROR_NONE)
fmt.println(info.fullpath) // /app (the root)
fmt.println(info.is_dir) // false (this is certainly a directory)return
}, nil)
}
Dockerfile I used to test it (and make sure it wasn't my os)
FROM alpine:latest
WORKDIR /odin
ENV PATH "$PATH:/usr/lib/llvm14/bin:/odin"RUN apk add --no-cache git bash make clang14 llvm14-dev musl-dev linux-headers
RUN git clone --depth=1 https://github.com/odin-lang/Odin . && \
LLVM_CONFIG=llvm14-config make
WORKDIR /app
# random file, doesn't get a call in the walkRUN echo "testing" > testing123.txt
# the file aboveCOPY test.odin test.odin
CMD ["odin", "run", "test.odin", "-file"]
The text was updated successfully, but these errors were encountered:
I believe the main issue is that the directory is not seen as a directory, and thats why it doesn't keep going to the other files.
Dockerfile I used to test it (and make sure it wasn't my os)
The text was updated successfully, but these errors were encountered: