@@ -4,7 +4,7 @@ use toml;
44use zip;
55use serde_json:: json;
66
7- static BLOCKLIST : [ & str ; 3 ] = [ ".git" , ".gitignore" , ".modu" ] ;
7+ static BLOCKLIST : [ & str ; 4 ] = [ ".git" , ".gitignore" , ".modu" , ".github "] ;
88
99fn read_dir ( dir : & std:: path:: Path , archive : & mut zip:: ZipWriter < std:: fs:: File > ) {
1010 for entry in std:: fs:: read_dir ( dir) . unwrap ( ) {
@@ -14,7 +14,7 @@ fn read_dir(dir: &std::path::Path, archive: &mut zip::ZipWriter<std::fs::File>)
1414 let mut do_break = false ;
1515
1616 for item in BLOCKLIST . iter ( ) {
17- if path. to_str ( ) . unwrap ( ) . replace ( "./ " , "" ) == * item {
17+ if path. to_str ( ) . unwrap ( ) . replace ( "\\ " , "/ " ) == format ! ( "./{}" , item) {
1818 println ! ( "Ignoring {}" , path. to_str( ) . unwrap( ) ) ;
1919 do_break = true ;
2020 }
@@ -33,7 +33,7 @@ fn read_dir(dir: &std::path::Path, archive: &mut zip::ZipWriter<std::fs::File>)
3333 file. read_to_string ( & mut gitignore_content) . unwrap ( ) ;
3434
3535 for line in gitignore_content. lines ( ) {
36- if path. to_str ( ) . unwrap ( ) . replace ( "./ " , "" ) == line {
36+ if path. to_str ( ) . unwrap ( ) . replace ( "\\ " , "/ " ) == format ! ( "./{}" , line) {
3737 println ! ( "Ignoring {}" , path. to_str( ) . unwrap( ) ) ;
3838 do_break = true ;
3939 }
0 commit comments