this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: fixing bug while checking input extension

+4 -2
+4 -2
src/main.rs
··· 132 132 // Compress by default, warn if if looks like an archive. 133 133 match &input { 134 134 CmprssInput::Path(path) => { 135 - if path.extension().unwrap() == compressor.extension() { 136 - return cmprss_error( 135 + if let Some(ext) = path.extension() { 136 + if ext == compressor.extension() { 137 + return cmprss_error( 137 138 &format!("error: input appears to already be a {} archive, exiting. Use '--compress' if needed.", compressor.name())); 139 + } 138 140 } 139 141 compressor.compress(input, output)?; 140 142 }