Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <896908DA55C4D311B9C000C04F01A05406F922@ENTERPRISE> From: Harold Hunt To: "'cygwin AT sources DOT redhat DOT com'" Subject: [PATCH] mkdir.cc - mkdir_p() (was: Samba install problems) Date: Mon, 11 Sep 2000 23:24:16 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C01C68.EE4D9614" ------_=_NextPart_000_01C01C68.EE4D9614 Content-Type: text/plain; charset="iso-8859-1" Samba 2.0.6+ seems to return ERROR_FILE_NOT_FOUND when a directory in the path handed to CreateDirectory() is not found; earlier versions of Samba seem to follow the Windows convention of returning ERROR_PATH_NOT_FOUND for missing directories. I sent the patch directly to DJ, and I believe he has reviewed it; this post is merely an announcement to those that may have been following the Samba installation problems thread. Harold ------_=_NextPart_000_01C01C68.EE4D9614 Content-Type: application/octet-stream; name="mkdir.cc.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="mkdir.cc.diff" Index: mkdir.cc=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/winsup/cinstall/mkdir.cc,v=0A= retrieving revision 2.0=0A= diff -p -3 -r2.0 mkdir.cc=0A= *** mkdir.cc 2000/08/08 00:27:54 2.0=0A= --- mkdir.cc 2000/09/12 02:42:35=0A= *************** mkdir_p (int isadir, char *path)=0A= *** 39,45 ****=0A= if (CreateDirectory (path, 0))=0A= return 0;=0A= gse =3D GetLastError ();=0A= ! if (gse !=3D ERROR_PATH_NOT_FOUND)=0A= {=0A= if (gse =3D=3D ERROR_ALREADY_EXISTS)=0A= {=0A= --- 39,45 ----=0A= if (CreateDirectory (path, 0))=0A= return 0;=0A= gse =3D GetLastError ();=0A= ! if (gse !=3D ERROR_PATH_NOT_FOUND && gse !=3D = ERROR_FILE_NOT_FOUND)=0A= {=0A= if (gse =3D=3D ERROR_ALREADY_EXISTS)=0A= {=0A= ------_=_NextPart_000_01C01C68.EE4D9614 Content-Type: application/octet-stream; name="ChangeLog1" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ChangeLog1" Mon Sep 11 22:40 2000 Harold L Hunt II = =0A= =0A= * mkdir.cc(mkdir_p): Create directories when ERROR_FILE_NOT_FOUND = is=0A= returned, as it seems Samba 2.0.6+ returns this instead of=0A= ERROR_PATH_NOT_FOUND=0A= ------_=_NextPart_000_01C01C68.EE4D9614 Content-Type: text/plain; charset=us-ascii -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com ------_=_NextPart_000_01C01C68.EE4D9614--