-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
If supfile contains more than the basename, i.e. some_directory/my_sup_file.sup instead of my_sup_file.sup, the process will crash inside startSocsimWithFile().
I'd guess the problem is in line 277 or 275 of events.cpp, based on what gets written to stdout before the crash.
The documentation is wrong to state that every sup and rate file should be referred to relative to folder. Currently, sup and rate files must be directly under folder for everything to work.
dir.create("tmp/tmp", recursive = TRUE)
tmpdir <- file.path(getwd(), "tmp/tmp")
dir.exists(tmpdir)
supname <- create_sup_file(simfolder = tmpdir)
file.exists(file.path(tmpdir, supname))
file.exists(file.path(getwd(), "tmp/tmp", supname))
identical(file.path(tmpdir, supname),
file.path(getwd(), "tmp/tmp", supname))
# This works
socsim(folder = tmpdir,
supfile = supname)
# This does not work
socsim(folder = file.path(getwd(), "tmp"),
supfile = file.path("tmp", supname))
The behavior happens whether the base directory is inside the working directory or not.
dir.create("U:/tmp/tmp", recursive = TRUE)
tmpdir <- "U:/tmp/tmp"
dir.exists(tmpdir)
supname <- create_sup_file(simfolder = tmpdir)
file.exists(file.path(tmpdir, supname))
file.exists(file.path("U:/tmp", "tmp", supname))
identical(file.path(tmpdir, supname),
file.path("U:/tmp", "tmp", supname))
# This works
socsim(folder = tmpdir,
supfile = supname)
# This does not work
socsim(folder = "U:/tmp",
supfile = file.path("tmp", supname))
Metadata
Metadata
Assignees
Labels
No labels