blob: 73a02416f724e9f0c36cd9e06a25a7006269e428 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
use crate::errors::*;
use crate::utils::*;
use std::fs;
pub 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)
.chain_err(|| format!("Unable to move {:?} to {:?}", &old_path, &new_path))?;
}
Ok(())
}
|