Skip to content

Commit e7d17b2

Browse files
author
Stephan Dilly
committed
remove config migration code
1 parent 58a1719 commit e7d17b2

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

src/main.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ fn main() -> Result<()> {
7979
return Ok(());
8080
}
8181

82-
// TODO: To be removed in a future version, when upgrading from 0.6.x or earlier is unlikely
83-
migrate_config()?;
84-
8582
setup_terminal()?;
8683
defer! {
8784
shutdown_terminal().expect("shutdown failed");
@@ -229,23 +226,6 @@ fn start_terminal<W: Write>(
229226
Ok(terminal)
230227
}
231228

232-
fn migrate_config() -> Result<()> {
233-
let cache_path: PathBuf = get_app_cache_path()?;
234-
235-
let entries = cache_path.read_dir()?.flatten().filter(|entry| {
236-
!entry.file_name().to_string_lossy().ends_with(".log")
237-
});
238-
239-
let config_path: PathBuf = get_app_config_path()?;
240-
for entry in entries {
241-
let mut config_path: PathBuf = config_path.clone();
242-
config_path.push(entry.file_name());
243-
fs::rename(entry.path(), config_path)?;
244-
}
245-
246-
Ok(())
247-
}
248-
249229
fn get_app_cache_path() -> Result<PathBuf> {
250230
let mut path = dirs::cache_dir()
251231
.ok_or_else(|| anyhow!("failed to find os cache dir."))?;

0 commit comments

Comments
 (0)