Skip to content

Commit

Permalink
Merge pull request #77 from Natizyskunk/save_before_upload_mtime
Browse files Browse the repository at this point in the history
Save before upload mtime
  • Loading branch information
Natizyskunk authored Oct 27, 2021
2 parents 9a3aa09 + a9fe4d4 commit 3a4e190
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
20 changes: 13 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
## 1.15.5 - 2021-10-27
* Update mtime after file was saved before upload. (Merged pull request [#75](https://github.com/Natizyskunk/vscode-sftp/pull/75) from viperet/save_before_upload_mtime).
* Add pull request issue template.
* Add funding/sponsors page.
* Add code scanning alert.

## 1.15.4 - 2021-10-04
* Remove error message when calling sftp.sftp.sync.remoteToLocal command in vscode tasks.json.

## 1.15.3 - 2021-09-10
* Upgrade `ssh2` version to official v1.4.0 by @mscdex.

## 1.15.2 - 2021-08-24
* Fix the `useTempFile` bug.
* Fix the `useTempFile` bug (Merged pull request [#41](https://github.com/Natizyskunk/vscode-sftp/pull/41) from kripper/master).
* Change `useTempFile` default value from true to false.
* Fix the "Cannot read property 'handle' of undefined" bug (related to `useTempFile` bug).
* Fix the "fd argument must be of type number. Received undefined" bug (related to `useTempFile` bug).
* Fix the "Cannot read property 'handle' of undefined" bug (related to `useTempFile` bug) [TypeError: Cannot read property 'handle' of undefined](https://github.com/Natizyskunk/vscode-sftp/issues/43).
* Fix the "fd argument must be of type number. Received undefined" bug (related to `useTempFile` bug) [TypeError since last update (The "fd" argument must be of type number.)](https://github.com/Natizyskunk/vscode-sftp/issues/34).
* Fix the "Permission denied" bug when uploading.
* New option [openSsh](https://github.com/Natizyskunk/vscode-sftp/wiki/Common-Config#openssh).
* New option [openSsh](https://github.com/Natizyskunk/vscode-sftp/wiki/Common-Config#openssh) (Pull request [#42](https://github.com/Natizyskunk/vscode-sftp/pull/42) from kripper/atomic-rename merged inside [#45](https://github.com/Natizyskunk/vscode-sftp/pull/45)).
* Update of the wiki to add support for openSsh option.

## 1.15.1 - 2021-08-24
* Add the `useTempFile` option to the test config spec.
* Fix get target mode error && add more precise logger-infos for tranfer tasks.
* Fix get target mode error && add more precise logger-infos for tranfer tasks (Merged pull request [#29](https://github.com/Natizyskunk/vscode-sftp/pull/29) from kripper/master).

## 1.15.0 - 2021-08-23
* New option [useTempFile](https://github.com/Natizyskunk/vscode-sftp/wiki/Common-Config#usetempfile).
* New option [useTempFile](https://github.com/Natizyskunk/vscode-sftp/wiki/Common-Config#usetempfile) (Merged pull request [#29](https://github.com/Natizyskunk/vscode-sftp/pull/29) from kripper/master).
* Update of the wiki to add support for useTempFile option.

## 1.14.0 - 2021-08-06
* Update of the FAQ to add support for old/legacy systems.
* switching from beta to stable.

## 1.14.0-beta - 2021-07-15
* Add `create remote file` and `create remote folder` commands.
* Add `create remote file` and `create remote folder` commands (Merged pull request [#18](https://github.com/Natizyskunk/vscode-sftp/pull/18) from mathsgod/master).

## 1.13.6 - 2021-07-15
* Fix syntax in `src\fileHandlers\transfer\__tests__\transfer-test.ts`.
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": "sftp",
"displayName": "SFTP",
"description": "SFTP/FTP sync",
"version": "1.15.4",
"version": "1.15.5",
"publisher": "Natizyskunk",
"author": "Natizyskunk <natan.fourie@hotmail.fr> (https://github.com/Natizyskunk)",
"engines": {
Expand Down
3 changes: 3 additions & 0 deletions src/fileHandlers/transfer/transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ async function transferWithType(
const document = textDocuments.find(doc => doc.fileName === config.srcFsPath);
if (document && !document.isClosed && document.isDirty) {
await document.save();
// Update mtime after file was saved
const stat = await config.srcFs.lstat(config.srcFsPath);
config.transferOption.mtime = stat.mtime;
logger.info('save before upload.');
}
}
Expand Down

0 comments on commit 3a4e190

Please sign in to comment.