[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in builtin function abspath

From: grischka
Subject: Re: Bug in builtin function abspath
Date: Tue, 30 May 2006 20:07:10 +0200

Maybe on your way it cant hurt to checkout window's native idea of 
whats an absolute path: 

char *abspath(const char *in, char *out)
  return in && GetFullPathName(in, MAX_PATH, out, NULL) ? out : NULL;

Looks simplicistic, but works.

With current directories c:\foo and d:\geez and current drive c:
    $(abspath bar) -> c:\foo\bar
    $(abspath c:bar) -> c:\foo\bar
    $(abspath d:bar) -> d:\geez\bar
    $(abspath \) -> c:\ 

> ... whereas the user _could_ have wanted the current directory when 
> the result of $abspath is _used_
Hm, afaik expansion of relative paths with the "current directory when 
they are used" is a built-in operating system service, so whoever 
wants that would not use $abspath in the first place :P

reply via email to

[Prev in Thread] Current Thread [Next in Thread]