File tree Expand file tree Collapse file tree 2 files changed +15
-11
lines changed
tooling/bundler/src/bundle/windows Expand file tree Collapse file tree 2 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " tauri-bundler " : " patch:bug"
3+ ---
4+
5+ Fix NSIS esitmated size unit being in kB (1000 bytes) not KB (1024 bytes)
Original file line number Diff line number Diff line change @@ -661,21 +661,20 @@ fn generate_binaries_data(settings: &Settings) -> crate::Result<BinariesMap> {
661661}
662662
663663fn generate_estimated_size (
664- main : & Path ,
664+ main : & PathBuf ,
665665 binaries : & BinariesMap ,
666666 resources : & ResourcesMap ,
667667) -> crate :: Result < String > {
668- use std:: fs:: metadata;
669-
670- let mut size = metadata ( main) ?. len ( ) ;
671-
672- for k in binaries. keys ( ) . chain ( resources. keys ( ) ) {
673- size += metadata ( k) ?. len ( ) ;
668+ let mut size = 0 ;
669+ for k in std:: iter:: once ( main)
670+ . chain ( binaries. keys ( ) )
671+ . chain ( resources. keys ( ) )
672+ {
673+ size += std:: fs:: metadata ( k)
674+ . with_context ( || format ! ( "when getting size of {}" , main. display( ) ) ) ?
675+ . len ( ) ;
674676 }
675-
676- size /= 1000 ;
677-
678- Ok ( format ! ( "{size:#08x}" ) )
677+ Ok ( format ! ( "{:#08x}" , size / 1024 ) )
679678}
680679
681680fn get_lang_data ( lang : & str ) -> Option < ( String , & [ u8 ] ) > {
You can’t perform that action at this time.
0 commit comments