Remove dependencies on fs and only use fs-extra
This commit is contained in:
parent
7e32028195
commit
301fa1c860
@ -1,8 +1,8 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import cheerio = require('cheerio');
|
import cheerio = require('cheerio');
|
||||||
import episode from './episode';
|
import episode from './episode';
|
||||||
import fs = require('fs');
|
// import fs = require('fs');
|
||||||
import fse = require('fs-extra');
|
import fs = require('fs-extra');
|
||||||
import my_request = require('./my_request');
|
import my_request = require('./my_request');
|
||||||
import path = require('path');
|
import path = require('path');
|
||||||
import url = require('url');
|
import url = require('url');
|
||||||
@ -34,7 +34,7 @@ export default function(config: IConfig, address: string, done: (err: Error) =>
|
|||||||
/* Make a backup of the persistent file in case of */
|
/* Make a backup of the persistent file in case of */
|
||||||
if (fileExist(persistentPath))
|
if (fileExist(persistentPath))
|
||||||
{
|
{
|
||||||
fse.copySync(persistentPath, persistentPath + '.backup');
|
fs.copySync(persistentPath, persistentPath + '.backup');
|
||||||
}
|
}
|
||||||
|
|
||||||
fs.readFile(persistentPath, 'utf8', (err: Error, contents: string) =>
|
fs.readFile(persistentPath, 'utf8', (err: Error, contents: string) =>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user