mirror of
https://git.openafs.org/openafs.git
synced 2025-01-21 00:10:15 +00:00
Windows: Fix GetIoctlHandle path construction
GetIoctlHandle() is used to construct the magic pioctl file path used to initiate pioctl operations with the cache manager. The first error introduced double directory separators. The second error was testing an uninitialized value which could have resulted in a missing directory separator. Change-Id: I4e863b854ea12b69858be712455dc6b6a0d36c39 Reviewed-on: http://gerrit.openafs.org/3925 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@openafs.org> Tested-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
parent
e6411317ce
commit
e4119971b0
@ -642,10 +642,10 @@ GetIoctlHandle(char *fileNamep, HANDLE * handlep)
|
||||
count++;
|
||||
i++;
|
||||
}
|
||||
if (fileNamep[i] == 0)
|
||||
if (fileNamep[i] == 0 || (fileNamep[i-1] != '\\' && fileNamep[i-1] != '/'))
|
||||
tbuffer[i++] = '\\';
|
||||
tbuffer[i] = 0;
|
||||
strcat(tbuffer, SMB_IOCTL_FILENAME);
|
||||
strcat(tbuffer, SMB_IOCTL_FILENAME_NOSLASH);
|
||||
} else {
|
||||
char curdir[MAX_PATH]="";
|
||||
|
||||
@ -683,7 +683,7 @@ GetIoctlHandle(char *fileNamep, HANDLE * handlep)
|
||||
count++;
|
||||
i++;
|
||||
}
|
||||
if (tbuffer[i] == 0)
|
||||
if (curdir[i] == 0 || (curdir[i-1] != '\\' && curdir[i-1] != '/'))
|
||||
tbuffer[i++] = '\\';
|
||||
tbuffer[i] = 0;
|
||||
strcat(tbuffer, SMB_IOCTL_FILENAME_NOSLASH);
|
||||
|
Loading…
Reference in New Issue
Block a user