mirror of
https://github.com/atom/atom.git
synced 2026-01-25 14:59:03 -05:00
Fixes https://github.com/atom/atom/issues/17013 by creating the recovery directory
This commit is contained in:
committed by
Max Brunsfeld
parent
3f8b463b15
commit
a885d8a030
@@ -2,6 +2,7 @@ const {dialog} = require('electron')
|
||||
const crypto = require('crypto')
|
||||
const Path = require('path')
|
||||
const fs = require('fs-plus')
|
||||
const mkdirp = require('mkdirp')
|
||||
|
||||
module.exports =
|
||||
class FileRecoveryService {
|
||||
@@ -146,6 +147,7 @@ async function tryStatFile (path) {
|
||||
}
|
||||
|
||||
async function copyFile (source, destination, mode) {
|
||||
mkdirp.sync(path.dirname(destination));
|
||||
return new Promise((resolve, reject) => {
|
||||
const readStream = fs.createReadStream(source)
|
||||
readStream
|
||||
|
||||
Reference in New Issue
Block a user