You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewError(tl.loc('LIB_MkdirFailedInvalidDriveRoot',directoryPath,testDir));// Unable to create directory '{p}'. Root directory does not exist: '{testDir}'
40
+
}
41
+
42
+
// push the dir and test the parent
43
+
stack.push(testDir);
44
+
testDir=parentDir;
45
+
continue;
46
+
}
47
+
elseif(err.code=='UNKNOWN'){
48
+
thrownewError(tl.loc('LIB_MkdirFailedInvalidShare',directoryPath,testDir))// Unable to create directory '{p}'. Unable to verify the directory exists: '{testDir}'. If directory is a file share, please verify the share name is correct, the share is online, and the current process has permission to access the share.
49
+
}
50
+
else{
51
+
throwerr;
52
+
}
53
+
}
54
+
55
+
if(!stats.isDirectory()){
56
+
thrownewError(tl.loc('LIB_MkdirFailedFileExists',directoryPath,testDir));// Unable to create directory '{p}'. Conflicting file exists: '{testDir}'
57
+
}
58
+
59
+
// testDir exists
60
+
break;
61
+
}
62
+
63
+
// create each directory
64
+
while(stack.length){
65
+
letdir=stack.pop();
66
+
tl.debug(`mkdir '${dir}'`);
67
+
try{
68
+
fs.mkdirSync(dir);
69
+
}catch(err){
70
+
thrownewError(tl.loc('LIB_MkdirFailed',directoryPath,err.message));// Unable to create directory '{p}'. {err.message}
thrownewError(tl.loc('LIB_MkdirFailedInvalidDriveRoot',directoryPath,testDir));// Unable to create directory '{p}'. Root directory does not exist: '{testDir}'
40
+
}
41
+
42
+
// push the dir and test the parent
43
+
stack.push(testDir);
44
+
testDir=parentDir;
45
+
continue;
46
+
}
47
+
elseif(err.code=='UNKNOWN'){
48
+
thrownewError(tl.loc('LIB_MkdirFailedInvalidShare',directoryPath,testDir))// Unable to create directory '{p}'. Unable to verify the directory exists: '{testDir}'. If directory is a file share, please verify the share name is correct, the share is online, and the current process has permission to access the share.
49
+
}
50
+
else{
51
+
throwerr;
52
+
}
53
+
}
54
+
55
+
if(!stats.isDirectory()){
56
+
thrownewError(tl.loc('LIB_MkdirFailedFileExists',directoryPath,testDir));// Unable to create directory '{p}'. Conflicting file exists: '{testDir}'
57
+
}
58
+
59
+
// testDir exists
60
+
break;
61
+
}
62
+
63
+
// create each directory
64
+
while(stack.length){
65
+
letdir=stack.pop();
66
+
tl.debug(`mkdir '${dir}'`);
67
+
try{
68
+
fs.mkdirSync(dir);
69
+
}catch(err){
70
+
thrownewError(tl.loc('LIB_MkdirFailed',directoryPath,err.message));// Unable to create directory '{p}'. {err.message}
0 commit comments