blob: 9f8fbc47db7846fc5087631aa480c25900c0d8e0 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 | use crate::errors::*;
use crate::utils::*;
use std::fs;
fn migrate_old_subscriptions() -> Result<()> {
    let path = get_podcast_dir()?;
    let mut old_path = path.clone();
    old_path.push(".subscriptions");
    if old_path.exists() {
        println!("Migrating old subscriptions file...");
        let new_path = get_sub_file()?;
        fs::rename(&old_path, &new_path)?;
    }
    Ok(())
}
pub fn migrate() -> Result<()> {
    migrate_old_subscriptions()
}
 |