Skip to content

Commit

Permalink
Add return if GetFiles() has IOException
Browse files Browse the repository at this point in the history
  • Loading branch information
diev committed Feb 13, 2019
1 parent 92bc9a7 commit 04c4296
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions samples/cmd/make.cmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo off
set version=1.3.0.18
set version=1.3.0.19
rem set net=%windir%\Microsoft.NET\Framework\v3.5
set net=%windir%\Microsoft.NET\Framework\v4.0.30319

Expand Down Expand Up @@ -239,7 +239,9 @@ goto :eof
:_args
echo string path = Path.GetDirectoryName(args[0]^);
echo string mask = Path.GetFileName(args[0]^);
echo string[] files = Directory.GetFiles(path, mask.Length == 0 ? "*" : mask^); if (files.Length == 0^) return;
echo string[] files;
echo try { files = Directory.GetFiles(path, mask.Length == 0 ? "*" : mask^); if (files.Length == 0^) return; }
echo catch { return; }
echo string pathOut = args[1]; Directory.CreateDirectory(pathOut^);

echo Encoding enc = Encoding.GetEncoding(1251^);
Expand Down

0 comments on commit 04c4296

Please sign in to comment.