return !error;
}
-static BOOL InAFS(register char *apath)
+BOOL IsPathInAfs(const CHAR *strPath)
{
struct ViceIoctl blob;
- register LONG code;
+ int code;
- HOURGLASS hourglass;
+ HOURGLASS hourglass;
blob.in_size = 0;
blob.out_size = MAXSIZE;
blob.out = space;
- code = pioctl(apath, VIOC_FILE_CELL_NAME, &blob, 1);
- if (code) {
- if ((errno == EINVAL) || (errno == ENOENT))
- return FALSE;
- }
-
- return TRUE;
+ code = pioctl((LPTSTR)((LPCTSTR)strPath), VIOC_FILE_CELL_NAME, &blob, 1);
+ if (code)
+ return FALSE;
+ return TRUE;
}
/* return a static pointer to a buffer */
else
cellName = (char *) 0;
- if (!InAFS(Parent(PCCHAR(strDir)))) {
+ if (!IsPathInAfs(Parent(PCCHAR(strDir)))) {
ShowMessageBox(IDS_MAKE_MP_NOT_AFS_ERROR, MB_ICONEXCLAMATION, IDS_MAKE_MP_NOT_AFS_ERROR);
return FALSE;
}
char tpbuffer[1024];
char *tp;
+ HOURGLASS hourglass;
+
tp = (char *) strrchr(linkName, '\\');
if (!tp)
tp = (char *) strrchr(linkName, '/');
struct ViceIoctl blob;
char *last_component;
int code;
+
+ HOURGLASS hourglass;
+
last_component = (char *) strrchr(true_name, '\\');
if (!last_component)
last_component = (char *) strrchr(true_name, '/');
return TRUE;
}
-BOOL IsPathInAfs(const CHAR *strPath)
-{
- struct ViceIoctl blob;
- int code;
-
- blob.in_size = 0;
- blob.out_size = MAXSIZE;
- blob.out = space;
-
- code = pioctl((LPTSTR)((LPCTSTR)strPath), VIOC_FILE_CELL_NAME, &blob, 1);
- if (code)
- return FALSE;
- return TRUE;
-}
-
UINT MakeSymbolicLink(const char *strName ,const char *strDir)
{
struct ViceIoctl blob;
char space[MAXSIZE];
UINT code;
- /*lets confirm its a good symlink*/
+
+ HOURGLASS hourglass;
+
+ /*lets confirm its a good symlink*/
if (!IsPathInAfs(strDir))
return 1;
LPTSTR lpsz = new TCHAR[strlen(strDir)+1];
char parent_dir[MAX_PATH+1]; /*Parent directory of true name*/
char *last_component; /*Last component of true name*/
UINT code;
- strcpy(orig_name, strName);
+
+ HOURGLASS hourglass;
+
+ strcpy(orig_name, strName);
strcpy(true_name, orig_name);
/*
* Find rightmost slash, if any.