diff options
Diffstat (limited to '')
| -rw-r--r-- | src/routes/backups.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/routes/backups.rs b/src/routes/backups.rs index 6f7617e..d68be8d 100644 --- a/src/routes/backups.rs +++ b/src/routes/backups.rs | |||
| @@ -119,14 +119,12 @@ async fn create_backup( | |||
| 119 | if let Ok(entries) = std::fs::read_dir(&data_dir) { | 119 | if let Ok(entries) = std::fs::read_dir(&data_dir) { |
| 120 | for entry in entries.flatten() { | 120 | for entry in entries.flatten() { |
| 121 | let path = entry.path(); | 121 | let path = entry.path(); |
| 122 | if path.is_file() { | 122 | if path.is_file() |
| 123 | if let Some(name) = path.file_name() { | 123 | && let Some(name) = path.file_name() |
| 124 | if let Ok(contents) = std::fs::read(&path) { | 124 | && let Ok(contents) = std::fs::read(&path) { |
| 125 | let _ = zip.start_file(&*name.to_string_lossy(), options); | 125 | let _ = zip.start_file(&*name.to_string_lossy(), options); |
| 126 | let _ = std::io::Write::write_all(&mut zip, &contents); | 126 | let _ = std::io::Write::write_all(&mut zip, &contents); |
| 127 | } | 127 | } |
| 128 | } | ||
| 129 | } | ||
| 130 | } | 128 | } |
| 131 | } | 129 | } |
| 132 | let _ = zip.finish(); | 130 | let _ = zip.finish(); |
