File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,10 @@ public static void Main(string[] args)
112112 . Build ( )
113113 . Bind ( applicationSettings ) ;
114114
115- applicationSettings . LocalDirectoryName = ParseLocalDirectoryPath ( applicationSettings , args . Last ( ) ) ;
115+ if ( args . Any ( ) )
116+ {
117+ applicationSettings . LocalDirectoryName = ParseLocalDirectoryPath ( applicationSettings , args . Last ( ) ) ;
118+ }
116119 }
117120
118121 catch ( Exception parameterException )
@@ -121,7 +124,7 @@ public static void Main(string[] args)
121124 return ;
122125 }
123126
124- if ( ( bool ) args [ 0 ] . ToLowerInvariant ( ) . StartsWith ( "--h" ) )
127+ if ( args . Any ( ) && ( bool ) args [ 0 ] . ToLowerInvariant ( ) . StartsWith ( "--h" ) )
125128 {
126129 PrintUsage ( applicationSettings ) ;
127130 return ;
@@ -130,6 +133,9 @@ public static void Main(string[] args)
130133 if ( String . IsNullOrEmpty ( applicationSettings . LocalDirectoryName )
131134 || ! Directory . Exists ( applicationSettings . LocalDirectoryName ) ) throw new Exception ( "Local directory name invalid." ) ;
132135
136+ DirectoryInfo localDirectoryInfo = new DirectoryInfo ( applicationSettings . LocalDirectoryName ) ;
137+ applicationSettings . LocalDirectoryName = localDirectoryInfo . FullName ;
138+
133139 #endregion
134140
135141 Logger logger = new Logger ( applicationSettings . LoggingLevel , applicationSettings . LogFileName ) ;
You can’t perform that action at this time.
0 commit comments