Summary
csc doesn't handle relative paths correctly
Metadata
- Id: 8d0ee5f0010036e0de9f008a9b1d0e26002379be
- Trac id: 449
- Type: defect
- Reporter: syn
- Owner:
- Cc:
- Status: closed
- Component: compiler
- Estimated difficulty:
- Resolution: fixed
- Priority: major
- Milestone: 4.9.0
- Version: 4.6.x
- Changetime: 2012-09-24 21:47:48 UTC
- Created: 2010-12-11 15:39:45 UTC
- Keywords: sorry for the ticket flood
Description
Passing a relative path containing more than one ".." leads to csc not expanding the path correctly. Example session:
$ mkdir foo $ echo "(print 'foo)" > foo.scm $ mkdir a $ cd a $ csc ../foo.scm # this works $ mkdir b $ cd b syn@gut /tmp/a/b $ csc ../../foo.scm
Error: Can not open file "foo.scm"
Error: shell command terminated with non-zero exit status 256: /usr/bin/chicken foo.scm -output-file foo.c
Changes and comments
[2010-12-12 14:30:37 UTC] sjamaan wrote:
The problem is that the compiler runs normalize-pathname to resolve symlinks and other references like "~". This also simply strips off the leading ..
I'd suggest removing the call to normalize-pathname at all, but I'm afraid that will probably completely break stuff for Windows, won't it?
[2010-12-12 14:32:42 UTC] sjamaan wrote:
s/the compiler/csc/ btw. (chicken ../../foo.scm works fine)
[2010-12-16 17:53:47 UTC] felix changed status from new to closed
[2010-12-16 17:53:47 UTC] felix set resolution to fixed
[2010-12-16 17:53:47 UTC] felix wrote:
I have tried to repair `normalize-pathname`, please give it a try.
[2011-06-01 09:00:41 UTC] felix changed milestone from 4.7.0 to 4.8.0
[2011-06-01 09:00:41 UTC] felix wrote:
Milestone 4.7.0 deleted
[2012-09-24 21:47:48 UTC] felix changed milestone from 4.8.0 to 4.9.0
[2012-09-24 21:47:48 UTC] felix wrote:
Milestone 4.8.0 deleted