Skip to content

Commit

Permalink
Fixed encrypt file path
Browse files Browse the repository at this point in the history
  • Loading branch information
JVenberg committed Aug 9, 2016
1 parent 39133f8 commit 172b243
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
var shell = require('electron').shell;
var remote = require('electron').remote;
var dialog = require('electron').remote.dialog;
var path = require('path');

var ptcJar = request.jar();
var ptcReq = request.defaults({
Expand Down Expand Up @@ -52,7 +53,7 @@

function openFile () {
dialog.showOpenDialog(function (fileNames) {
fs.copySync((fileNames[0]), 'gofbot/encrypt'+fileNames[0].match(/\.\w+/)[0]);
fs.copySync((fileNames[0]), path.join(__dirname, '../gofbot/encrypt'+fileNames[0].match(/\.\w+/)[0]));
var file_end = fileNames[0]
document.getElementById('file_path').innerHTML = fileNames[0]
});
Expand Down

0 comments on commit 172b243

Please sign in to comment.