Don't download files that have already been downloaded.

--HG--
extra : convert_revision : svn%3A946a0da7-ebce-4904-9acb-2f1e67aed693%40214
pull/8/head
Ryan Stecker 15 years ago
parent bb5c544414
commit 14f2b6e39d

@ -75,14 +75,23 @@ namespace DepotDownloader
if ( dirEntry.FileID == -1 )
{
// this is a directory, so lets just create it
Directory.CreateDirectory( downloadPath );
if ( !Directory.Exists( downloadPath ) )
{
// this is a directory, so lets just create it
Directory.CreateDirectory( downloadPath );
}
continue;
}
float perc = ( ( float )x / ( float )manifest.DirEntries.Count ) * 100.0f;
Console.WriteLine( " {0:0.00}%\t{1}", perc, dirEntry.FullName );
FileInfo fi = new FileInfo( downloadPath );
if ( fi.Exists && fi.Length == dirEntry.ItemSize )
continue;
ContentServerClient.File file = csClient.DownloadFile( storageId, dirEntry.FileID );
if ( file.FileMode == 1 )

Loading…
Cancel
Save