Staging
v0.5.1
https://github.com/python/cpython
Revision f29286e610ca3860ed5f6866b4a6daf03aba77d3 authored by Barry Warsaw on 03 September 2003, 04:14:01 UTC, committed by Barry Warsaw on 03 September 2003, 04:14:01 UTC
quotes.  Fixes SF bug #794466, with the essential patch provided by
Stuart D. Gathman.  Specifically,

_parseparam(), _get_params_preserve(): Use the parsing function that
takes quotes into account, as given (essentially) in the bug report's
test program.

Backport candidate.
1 parent 3b7340c
Raw File
Tip revision: f29286e610ca3860ed5f6866b4a6daf03aba77d3 authored by Barry Warsaw on 03 September 2003, 04:14:01 UTC
A fix for parsing parameters when there are semicolons inside the
Tip revision: f29286e
mkdir.c
/* Mkdir for the Macintosh.
   Public domain by Guido van Rossum, CWI, Amsterdam (July 1987).
   Pathnames must be Macintosh paths, with colons as separators. */

#include "macdefs.h"

/* Create a directory. */

int
mkdir(path, mode)
	char *path;
	int mode; /* Ignored */
{
	HFileParam pb;
		
	if (!hfsrunning()) {
		errno= ENODEV;
		return -1;
	}
	pb.ioNamePtr= (StringPtr) Pstring(path);
	pb.ioVRefNum= 0;
	pb.ioDirID= 0;
	if (PBDirCreate((HParmBlkPtr)&pb, FALSE) != noErr) {
		errno= EACCES;
		return -1;
	}
	return 0;
}
back to top