mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-02-26 13:31:17 +03:00
Throw exception if ContentFolder doesn't exist or is empty
This commit is contained in:
parent
0beaeb2e9d
commit
c10167bb91
@ -96,6 +96,19 @@ namespace Steamworks.Ugc
|
||||
if ( consumerAppId == 0 )
|
||||
consumerAppId = SteamClient.AppId;
|
||||
|
||||
//
|
||||
// Checks
|
||||
//
|
||||
if ( ContentFolder != null )
|
||||
{
|
||||
if ( !System.IO.Directory.Exists( ContentFolder.FullName ) )
|
||||
throw new System.Exception( $"UgcEditor - Content Folder doesn't exist ({ContentFolder.FullName})" );
|
||||
|
||||
if ( !ContentFolder.EnumerateFiles( "*", System.IO.SearchOption.AllDirectories ).Any() )
|
||||
throw new System.Exception( $"UgcEditor - Content Folder is empty" );
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Item Create
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user