summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/common.ml
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-09-30 17:48:40 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-09-30 17:48:40 +0000
commit0a98ba4f53db91ece5634cda36d4cb70766bd346 (patch)
tree4144a219890ac2cd4e3b5ad78266a8b566249621 /perl_checker.src/common.ml
parentac6a973ef054a7d27cc60713a889a53e44b4d67d (diff)
downloadperl_checker-0a98ba4f53db91ece5634cda36d4cb70766bd346.tar
perl_checker-0a98ba4f53db91ece5634cda36d4cb70766bd346.tar.gz
perl_checker-0a98ba4f53db91ece5634cda36d4cb70766bd346.tar.bz2
perl_checker-0a98ba4f53db91ece5634cda36d4cb70766bd346.tar.xz
perl_checker-0a98ba4f53db91ece5634cda36d4cb70766bd346.zip
use absolute directories in Tree.use_lib
Diffstat (limited to 'perl_checker.src/common.ml')
-rw-r--r--perl_checker.src/common.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl_checker.src/common.ml b/perl_checker.src/common.ml
index 9286857..4a7f950 100644
--- a/perl_checker.src/common.ml
+++ b/perl_checker.src/common.ml
@@ -829,7 +829,9 @@ let expand_symlinks file =
| _ -> internal_error (Printf.sprintf "expand_symlinks: %s is relative\n" file)
let file_to_absolute_file file =
- if file.[0] = '/' then file else expand_symlinks (Unix.getcwd() ^ "/" ^ file)
+ if file.[0] = '/' then file else
+ let cwd = Unix.getcwd() in
+ if file = "." then cwd else expand_symlinks (cwd ^ "/" ^ file)
let mtime f = int_of_float ((Unix.stat f).Unix.st_mtime)