| www.delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin-developers/> |
| List-Post: | <mailto:cygwin-developers AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-developers-owner AT sources DOT redhat DOT com |
| Delivered-To: | mailing list cygwin-developers AT sources DOT redhat DOT com |
| Date: | Mon, 11 Sep 2000 19:14:32 +0400 |
| From: | Egor Duda <deo AT logos-m DOT ru> |
| X-Mailer: | The Bat! (v1.45) Personal |
| Reply-To: | Egor Duda <cygwin-developers AT sourceware DOT cygnus DOT com> |
| Organization: | DEO |
| X-Priority: | 3 (Normal) |
| Message-ID: | <142526531031.20000911191432@logos-m.ru> |
| To: | cygwin-developers AT sourceware DOT cygnus DOT com |
| Subject: | chdir problem |
| Mime-Version: | 1.0 |
Hi!
the following code:
========================================================================
#include <stdio.h>
#include <unistd.h>
#include <windows.h>
main()
{
int rc;
char cwd [ MAX_PATH + 1 ];
bzero ( cwd, sizeof ( cwd ) );
if ( ( rc = chdir ( "/tmp" ) ) != 0 ) perror ( "chdir 1" );
if ( ( rc = chdir ( "." ) ) != 0 ) perror ( "chdir 2" );
if ( ( rc = chdir ( ".." ) ) != 0 ) perror ( "chdir 3" );
getcwd ( cwd, sizeof ( cwd ) - 1 );
printf ( "%s", cwd );
} ;
========================================================================
prints '/tmp' instead of '/'
i suspect that it should be fixed in normalize_posix_path(), but
i'm not ready to propose a patch until i understand fully how this
function works. Chris, would you take a look at this?
Egor. mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |