Skip to content

Commit

Permalink
Merge pull request #21 from ags1773/master
Browse files Browse the repository at this point in the history
solved issue #19: geminio command throwing EISDIR error when source i…
  • Loading branch information
xeon-zolt authored Oct 10, 2018
2 parents 4161e53 + 6e50201 commit d165d78
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions geminio.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ else{
var destination = process.argv[3];

if(fs.existsSync(source)){
const srcStats = fs.statSync(source);
const destStats = fs.statSync(destination);

if (srcStats.isFile() && destStats.isDirectory()){
const temp = source.split('/');
destination += '/' + temp[temp.length - 1];
}

fs.copy(source,destination,err => {
if(err){
return console.log(err);
Expand Down

0 comments on commit d165d78

Please sign in to comment.