Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mkloubert committed Mar 3, 2018
1 parent 9382217 commit af98c32
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

[![Share via Facebook](https://raw.githubusercontent.com/mkloubert/vscode-deploy-reloaded/master/img/share/Facebook.png)](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-deploy-reloaded&quote=vscode-deploy-reloaded) [![Share via Twitter](https://raw.githubusercontent.com/mkloubert/vscode-deploy-reloaded/master/img/share/Twitter.png)](https://twitter.com/intent/tweet?source=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-deploy-reloaded&text=vscode-deploy-reloaded:%20https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-deploy-reloaded&via=mjkloubert) [![Share via Google+](https://raw.githubusercontent.com/mkloubert/vscode-deploy-reloaded/master/img/share/Google+.png)](https://plus.google.com/share?url=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-deploy-reloaded) [![Share via Pinterest](https://raw.githubusercontent.com/mkloubert/vscode-deploy-reloaded/master/img/share/Pinterest.png)](https://pinterest.com/pin/create/button/?url=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-deploy-reloaded&media=https://raw.githubusercontent.com/mkloubert/vscode-deploy-reloaded/master/img/demo1.gif&description=Recoded%20version%20of%20Visual%20Studio%20Code%20extension%20%27vs-deploy%27%2C%20which%20provides%20commands%20to%20deploy%20files%20to%20one%20or%20more%20destinations.) [![Share via Reddit](https://raw.githubusercontent.com/mkloubert/vscode-deploy-reloaded/master/img/share/Reddit.png)](https://www.reddit.com/submit?url=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-deploy-reloaded&title=vscode-deploy-reloaded) [![Share via LinkedIn](https://raw.githubusercontent.com/mkloubert/vscode-deploy-reloaded/master/img/share/LinkedIn.png)](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-deploy-reloaded&title=vscode-deploy-reloaded&summary=Recoded%20version%20of%20Visual%20Studio%20Code%20extension%20%27vs-deploy%27%2C%20which%20provides%20commands%20to%20deploy%20files%20to%20one%20or%20more%20destinations.&source=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-deploy-reloaded) [![Share via Wordpress](https://raw.githubusercontent.com/mkloubert/vscode-deploy-reloaded/master/img/share/Wordpress.png)](https://wordpress.com/press-this.php?u=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-deploy-reloaded&quote=vscode-deploy-reloaded&s=Recoded%20version%20of%20Visual%20Studio%20Code%20extension%20%27vs-deploy%27%2C%20which%20provides%20commands%20to%20deploy%20files%20to%20one%20or%20more%20destinations.&i=https://raw.githubusercontent.com/mkloubert/vscode-deploy-reloaded/master/img/demo1.gif) [![Share via Email](https://raw.githubusercontent.com/mkloubert/vscode-deploy-reloaded/master/img/share/Email.png)](mailto:?subject=vscode-deploy-reloaded&body=Recoded%20version%20of%20Visual%20Studio%20Code%20extension%20'vs-deploy'%2C%20which%20provides%20commands%20to%20deploy%20files%20to%20one%20or%20more%20destinations.:%20https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-deploy-reloaded)

## 0.53.2 (February 3rd, bugfixes)
## 0.53.3 (February 3rd, bugfixes)

* fixed encoding problem, when pulling, especially binary, files, via [SFTP](https://github.com/mkloubert/vscode-deploy-reloaded/wiki/target_sftp) ... s. [issue #34](https://github.com/mkloubert/vscode-deploy-reloaded/issues/34)
* fixed setting [modes](https://github.com/mkloubert/vscode-deploy-reloaded/wiki/target_sftp#modes-for-specific-files) of root files after upload to a [SFTP](https://github.com/mkloubert/vscode-deploy-reloaded/wiki/target_sftp) server ... s. [issue #33](https://github.com/mkloubert/vscode-deploy-reloaded/issues/33)

## 0.53.1 (February 21st, bugfixes)

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-deploy-reloaded",
"displayName": "Deploy (Reloaded)",
"description": "Deploys files of a workspace to a destination.",
"version": "0.53.2",
"version": "0.53.3",
"publisher": "mkloubert",
"engines": {
"vscode": "^1.20.0"
Expand Down
21 changes: 20 additions & 1 deletion src/clients/sftp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ export class SFTPClient extends deploy_clients.AsyncFileListBase {
let modes = this.options.modes;
if (!deploy_helpers.isObject<SFTPFileModePatterns>(modes)) {
modes = {
'**': modes
'**/*': modes
};
}

Expand All @@ -328,6 +328,7 @@ export class SFTPClient extends deploy_clients.AsyncFileListBase {

let modeToSet: number | false = false;
if (false !== fileModes) {
let matchedPattern: false | string = false;
for (const P in fileModes) {
let pattern = P;
if (!pattern.startsWith('/')) {
Expand All @@ -340,11 +341,21 @@ export class SFTPClient extends deploy_clients.AsyncFileListBase {
};

if (deploy_helpers.doesMatch(path, pattern, MATCH_OPTS)) {
matchedPattern = P;
modeToSet = parseInt(deploy_helpers.toStringSafe(fileModes[P]).trim(),
8);
break;
}
}

if (false === matchedPattern) {
deploy_log.CONSOLE
.notice(`'${path}' does NOT match with a mode pattern`, 'clients.sftp.uploadFile(3)');
}
else {
deploy_log.CONSOLE
.notice(`'${path}' matches with mode pattern '${matchedPattern}'`, 'clients.sftp.uploadFile(3)');
}
}

await this.client.put(
Expand All @@ -353,7 +364,15 @@ export class SFTPClient extends deploy_clients.AsyncFileListBase {
);

if (false !== modeToSet) {
deploy_log.CONSOLE
.info(`Setting mode for '${path}' to ${modeToSet.toString(8)} ...`, 'clients.sftp.uploadFile(1)');

this.client['sftp'].chmod(path, modeToSet, (err) => {
if (err) {
deploy_log.CONSOLE
.trace(err, 'clients.sftp.uploadFile(2)');
}

COMPLETED(err);
});
}
Expand Down
6 changes: 5 additions & 1 deletion src/targets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,11 @@ export function getNameAndPathForFileDeployment(target: Target,
break;
}
}
}
}

if ('.' === path) {
path = '';
}

return {
name: name,
Expand Down

0 comments on commit af98c32

Please sign in to comment.