In ConvertUnixPathToMacPath, removed the checks that disallow path names

that begin with /bin, /dev, and /etc.  These directories don't have
any special meaning on the Mac and should be allowed.  Thanks to
Mike Pinkerton <pinkerton@netscape.com> for reporting this bug and
providing the fix.
This commit is contained in:
wtc 1998-04-15 01:28:33 +00:00
parent 7cd7c2c3a4
commit 820ab53246

View File

@ -1250,24 +1250,6 @@ ConvertUnixPathToMacPath(const char *unixPath, char **macPath)
}
}
else if (strncmp(unixPath, "/bin", strlen("/bin")) == 0) {
dprintf("Unable to translate Unix file path %s to Mac path\n", unixPath);
err = -1;
goto Exit_ConvertUnixPathToMacPath;
}
else if (strncmp(unixPath, "/dev", strlen("/dev")) == 0) {
dprintf("Unable to translate Unix file path %s to Mac path\n", unixPath);
err = -1;
goto Exit_ConvertUnixPathToMacPath;
}
else if (strncmp(unixPath, "/etc", strlen("/etc")) == 0) {
dprintf("Unable to translate Unix file path %s to Mac path\n", unixPath);
err = -1;
goto Exit_ConvertUnixPathToMacPath;
}
else if (!strncmp(unixPath, "/usr/local/netscape/", (tempLen = strlen("/usr/local/netscape/")))) {
unixPath += tempLen;
@ -1723,24 +1705,6 @@ static OSErr ConvertUnixPathToMacPath(const char *unixPath, char **macPath)
&foundVRefNum, &foundDirID);
}
else if (strncmp(unixPath, "/bin", strlen("/bin")) == 0) {
dprintf("Unable to translate Unix file path %s to Mac path\n", unixPath);
err = -1;
goto Exit_ConvertUnixPathToMacPath;
}
else if (strncmp(unixPath, "/dev", strlen("/dev")) == 0) {
dprintf("Unable to translate Unix file path %s to Mac path\n", unixPath);
err = -1;
goto Exit_ConvertUnixPathToMacPath;
}
else if (strncmp(unixPath, "/etc", strlen("/etc")) == 0) {
dprintf("Unable to translate Unix file path %s to Mac path\n", unixPath);
err = -1;
goto Exit_ConvertUnixPathToMacPath;
}
else if (strncmp(unixPath, "/usr", strlen("/usr")) == 0) {
int usrNetscapePathLen;