Comment #1 by andrej.mitrovich — 2013-03-29T06:59:42Z
Which OS? I'm seeing the opposite effect:
dmd -J. main.d // works
dmd -J/ main.d // CT error
Comment #2 by andrej.mitrovich — 2013-03-29T06:59:59Z
(In reply to comment #1)
> Which OS? I'm seeing the opposite effect:
>
> dmd -J. main.d // works
> dmd -J/ main.d // CT error
Mine using Win7.
Comment #3 by timothee.cour2 — 2013-03-29T10:26:53Z
(In reply to comment #2)
> (In reply to comment #1)
> > Which OS? I'm seeing the opposite effect:
> >
> > dmd -J. main.d // works
> > dmd -J/ main.d // CT error
>
> Mine using Win7.
OSX.
also, I actually meant compile with absolute path to main.d given to dmd:
dmd -J. /path/to/main.d //fails
dmd -J/ /path/to/main.d //works
so that __FILE__ is an absolute path
Comment #4 by timothee.cour2 — 2013-03-29T10:36:53Z
(In reply to comment #2)
> (In reply to comment #1)
> > Which OS? I'm seeing the opposite effect:
> >
> > dmd -J. main.d // works
> > dmd -J/ main.d // CT error
>
> Mine using Win7.
OSX.
also, I actually meant compile with absolute path to main.d given to dmd:
dmd -J. /path/to/main.d //fails
dmd -J/ /path/to/main.d //works
so that __FILE__ is an absolute path
Comment #5 by dlang-bugzilla — 2015-03-27T16:45:41Z
String-importing absolute paths to arbitrary files are forbidden by design, to prevent programs from capturing arbitrary files from the filesystem during compilation.
The bug is that the compiler should realize that the absolute path, in fact, points to a file that is under the allowed string import path (-J.).
Comment #6 by robert.schadek — 2024-12-13T18:05:29Z