We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eeaba58 commit 22c2caeCopy full SHA for 22c2cae
samples/cs/tar/Main.cs
@@ -161,7 +161,8 @@ public void InstanceMain(string[] argv)
161
162
if (this.archiveName != null && ! this.archiveName.Equals("-")) {
163
if (operation == Operation.Create) {
164
- if (!Directory.Exists(Path.GetDirectoryName(archiveName))) {
+ string dirName = Path.GetDirectoryName(archiveName);
165
+ if ((dirName.Length > 0) && !Directory.Exists(dirName)) {
166
Console.Error.WriteLine("Directory for archive doesnt exist");
167
return;
168
}
0 commit comments