Skip to content

Commit d165d78

Browse files
authored
Merge pull request #21 from ags1773/master
solved issue #19: geminio command throwing EISDIR error when source i…
2 parents 4161e53 + 6e50201 commit d165d78

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

geminio.js

+8
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ else{
1212
var destination = process.argv[3];
1313

1414
if(fs.existsSync(source)){
15+
const srcStats = fs.statSync(source);
16+
const destStats = fs.statSync(destination);
17+
18+
if (srcStats.isFile() && destStats.isDirectory()){
19+
const temp = source.split('/');
20+
destination += '/' + temp[temp.length - 1];
21+
}
22+
1523
fs.copy(source,destination,err => {
1624
if(err){
1725
return console.log(err);

0 commit comments

Comments
 (0)