File tree Expand file tree Collapse file tree
Project-Aurora/Aurora-Updater Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -245,11 +245,11 @@ private bool ExtractUpdate()
245245
246246 for ( int i = 0 ; i < countOfEntries ; i ++ )
247247 {
248- float percentage = ( ( float ) i / ( float ) countOfEntries ) ;
248+ float percentage = i / ( float ) countOfEntries ;
249249
250250 var fileEntry = updateFile . Entries [ i ] ;
251251 log . Enqueue ( new LogEntry ( $ "[{ Math . Truncate ( percentage * 100 ) } %] Updating: { fileEntry . FullName } ") ) ;
252- this . extractProgess = ( float ) ( Math . Truncate ( percentage * 100 ) / 100.0f ) ;
252+ extractProgess = ( float ) ( Math . Truncate ( percentage * 100 ) / 100.0f ) ;
253253
254254 if ( ignoreFiles . Contains ( fileEntry . FullName ) )
255255 continue ;
@@ -259,6 +259,7 @@ private bool ExtractUpdate()
259259 var filePath = Path . Combine ( Program . exePath , fileEntry . FullName ) ;
260260 if ( File . Exists ( filePath ) )
261261 File . Move ( filePath , $ "{ filePath } .updateremove") ;
262+ Directory . CreateDirectory ( Path . GetDirectoryName ( filePath ) ) ;
262263 fileEntry . ExtractToFile ( filePath ) ;
263264 }
264265 catch ( IOException e )
@@ -267,7 +268,6 @@ private bool ExtractUpdate()
267268
268269 MessageBox . Show ( $ "{ fileEntry . FullName } is inaccessible.\r \n Please close Aurora.\r \n \r \n { e . Message } ") ;
269270 i -- ;
270- continue ;
271271 }
272272 }
273273
You can’t perform that action at this time.
0 commit comments