bug-coreutils
[Top][All Lists]
Advanced

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

Re: logical paths


From: Kartik K. Agaram
Subject: Re: logical paths
Date: Sun, 10 Sep 2006 04:02:21 -0500 (CDT)

".." occurs in a lot of places.  Will those patches put a wrapper
around every system call that uses a file name?  And what, exactly,
will that wrapper do?

Will the patch add a new option to every coreutils command that uses
file names?  That sounds pretty intrusive.

What will the wrapper do? Hmm, I had a look at coreutils-5.97/ls.c for starters, and my plan had been to compute absolute_name in gobble_file (ie for every non-option argument to a coreutils command) using pwd if it's a relative path. I simply collapse away any number of '..'s with elements from pwd, and compute an absolute path before feeding it to stat. Yes, it'll call for an extra option, but I think it'll be consistent across all of coreutils and the code is mostly a single function to convert relative path to absolute path that we can use across all of coreutils. These are my tentative thoughts.

I understand that adding an option or environment variable is a major addition, so please bring up objections. In particular, can you point out some other places than non-option arguments that we need to handle '..'?

Thanks,
Kartik




reply via email to

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