Eduardo Correia
8f67d22382
Give script rmdir's directory entries a full path
...
For rmdir, TScript::CreateFileList (fltDirectories) creates a bare
TRemoteFile with only its name and type: no directory list and no full
file name. TWebDAVFileSystem::DeleteFile takes the path from
File->FullFileName, and TRemoteFile::GetFullFileName then dereferences the
null Directory. With WinSCP 6.5.7 a script doing
mkdir /work/gone
rmdir /work/gone
over WebDAV fails with "Invalid access to memory" in
TRemoteFileList::GetFullDirectory (from TWebDAVFileSystem::FilePath,
TTerminal::DoDeleteFile, TScript::RmDirProc).
The entry now carries its absolute path, resolved as TTerminal::DoDeleteFile
resolves the same name. Protocols that use the file name (SFTP, SCP, FTP)
are unaffected; WebDAV now deletes the directory.
2026-10-13 14:08:14 +02:00
Martin Prikryl
3a2f4913c6
Merging DefaultsOnly and ProtocolDefined parameters
...
Source commit: 0d19541f3856ea463616237e3df15d99c721ad5d
2026-06-10 01:40:13 +02:00
Martin Prikryl
e5efed8955
Refactoring old-style casts
...
Source commit: 3c37b3a958525c595ad44b081b2e0f3b288b8eb0
2025-12-18 01:20:33 +01:00
Martin Prikryl
a5dcb5f03c
Using std::size instead of custom macro
...
Source commit: 1a89c80dd42426351f261526b617534bab664208
2025-12-07 01:17:54 +01:00
Martin Prikryl
fa31217b53
Refactoring in anticipation of synchronization not always being local-remote (Issue 2020)
...
Source commit: 2d05944202efceaff012888c6b0de956314c91b6
2025-10-01 15:30:12 +02:00
Martin Prikryl
41c7cfe303
Undoing replacement of *IncludeTrailingBackslash with *CombinePaths in a01665f2
...
It fails an assertion in UnixCombinePaths
Source commit: 1e18406514b377940de82d2862dde3d339d1e42c
2025-10-01 15:27:14 +02:00
Martin Prikryl
a01665f294
Factoring out universal path utility functions that will also be used Issue 2020
...
Source commit: ecc9f746b50cf7f0203dcb08b1db627375cf5295
2025-10-01 01:19:58 +02:00
Martin Prikryl
b13e2e7c2b
#pragma package(smart_init) is not useful out of packages
...
Source commit: 7635ac3b532214f27ea2b6fe6aa80398c857cfcd
2025-08-23 01:06:48 +02:00
Martin Prikryl
3817bbd736
Preparing for separate pre-compiled header file required by Clang
...
- Once doing that, including more headers to PCH, not just vcl.h
- Clang won't need explicit include, but we will probably keep it anyway.
- #pragma hdrstop has no effect in Clang
Source commit: adc8a268b6907c5337ccaa430cca7526793a3019
2025-08-22 15:43:55 +02:00
Martin Prikryl
92ba1e3f0e
Some (hopefully noop) refactoring to solve Clang internal compiler error when using new variable in __finally block + Some other small code changes imposed by Clang
...
Source commit: eef61854e4463990c6e823a08451a9e229a8c54b
2025-03-14 16:17:09 +01:00
Martin Prikryl
f7f00c631e
Clang imposed changes that should be noop and have no effect on classic compiler
...
Mostly:
– incorrectly identified uninitialized variables
– explicit static global variables
– const, sign and down casts and safety
– typename use
– semicolon after function implementation
– unused variables, fields, arguments and macros
– field initialization order
– exact include filename case
– redundant in code macros already defined at project level
Source commit: 5c1338d95bd275082288dd1e773a033df6e379cd
2025-03-13 16:39:24 +01:00
Martin Prikryl
4019b56ffb
Code errors identified by Clang
...
Notably:
Bug fix: Monospace font is not remembered if SSH banners are administratively forced
Change: Bug fix: In XML log, filename tag was included in stat tag, although explicitly documented not to
Source commit: 693ecd9b083f1460dc4d1ae1ff49e625989f8a50
2025-03-13 06:36:08 +01:00
Martin Prikryl
3dcb30ca22
Issue 2342 – Command-line interface for installing public key into server
...
https://winscp.net/tracker/2342
Source commit: 4dee00b059312367058fa5bcccac2cc187ad14a3
2025-01-25 01:04:17 +01:00
Martin Prikryl
ef4e1e87ab
Unused parameter
...
(it seems that it was never used)
Source commit: 7a61240971f9606d2156e588352db3f63d531e7f
2025-01-24 01:14:40 +01:00
Martin Prikryl
c3aadded64
Factoring out some commons synchronization checklist functions
...
Source commit: 476fef1cfeea061ec1d35cdb24b2528263eaf247
2024-12-14 01:15:01 +01:00
Martin Prikryl
e613fa29fe
Bug fix: When moving an ongoing delete operation to background queue, it might attempt to delete the current file again, failing the operation
...
Overall, the test for cancel is probably redundant for all scenarios. But to limit impact, I'm keeping it for most scenarios, except for the delete.
Source commit: c24c339bd5c5621a74c356b8189487e35dc2ab41
2024-12-11 01:21:14 +01:00
Martin Prikryl
5deca33acf
Issue 2291 – Failure when trying to automate file synchronization by checksum on an SFTP server that does not support it natively
...
https://winscp.net/tracker/2291
Source commit: e41184d38b7fb153931146024e6794acd2b84d12
2024-05-24 01:05:15 +02:00
Martin Prikryl
da0fc7ab56
Issue 2271 – Misplaced stored site use warning in scripting when session name is specified
...
https://winscp.net/tracker/2271
Source commit: 37fee417a4f1221a2bea4824f36d162a35bc3ae6
2024-03-05 01:11:30 +01:00
Martin Prikryl
e782da2c87
Issue 2260 – Failure when trying to synchronize files by checksum on server that does not support it
...
https://winscp.net/tracker/2260
Source commit: d23d1a3ca251922e98b128ea807f120a690fe517
2024-02-21 01:03:48 +01:00
Martin Prikryl
804ec9c9c9
Bug 52: Use file hash as criterion for synchronization
...
https://winscp.net/tracker/52
Source commit: 66fd353f8e26a7bd3317ee7cc4e6d15e7d6cfb52
2023-11-07 02:03:32 +01:00
Martin Prikryl
d7ceff3eea
Bug 2233: Consistent behavior across protocols and protocol capabilities when duplicating remote files
...
https://winscp.net/tracker/2233
Source commit: 2e8369131ae6d964b6d454036c2b79472142e06e
2023-10-25 12:59:49 +02:00
Martin Prikryl
c9390ec2f8
Factoring out TSearchRecChecked::GetFilePath()
...
Source commit: 520a6513e98fa51aaf4bf4609dd5f187291ab035
2023-06-29 01:06:58 +02:00
Martin Prikryl
7f7427a236
Bug fix: With debug logging enabled, the echoed script commands and XML log group names miss the command name
...
Caused by 069aa20f
Source commit: 2692655a4bf1261b907b346c3c8d0179c70c0bd0
2023-04-21 07:09:38 +02:00
Martin Prikryl
9dcaa8a7f3
Refactoring TTerminal::ReadFile + Adding TTerminal::TryReadFile + Solving memory leak on the way
...
Source commit: 4a5c5634006d2bd9a1c6c4831d0e528b91ecd9ae
2023-03-24 00:54:30 +01:00
Martin Prikryl
c280d67894
Commit cb021fe3 unintentionally introduced overwrite confirmation to scripting
...
(cherry picked from commit b39ad55c021027cc166132bf74241f92a199d5a9)
# Conflicts:
# source/core/Terminal.cpp
Source commit: 54c4ff8724d2a4ddcc7e5436c4442fdb0205789d
2023-01-12 01:20:47 +01:00
Martin Prikryl
c1a1f3e945
Bug 2102: Reading password from a file (also in commandline)
...
https://winscp.net/tracker/2102
Source commit: d289a6b641f6abdd82dd978b5b43bf14d62b915a
2022-09-22 00:58:25 +02:00
Martin Prikryl
93a1a15195
Bug 2102: Reading password from a file in scripting
...
https://winscp.net/tracker/2102
Source commit: 800bece84b818b09f26abf28e2ccc2d8700b3d26
2022-09-17 01:01:37 +02:00
Martin Prikryl
b4c490b497
File checksum calculation support for SCP protocol and SFTP protocol via secondary shell session using shell commands like sha256sum
...
Part of Bug 52
https://winscp.net/tracker/52
Source commit: 6804a5d18405a91e8d0a2e0beccf2c31d43ed3f1
2022-07-16 00:54:05 +02:00
Martin Prikryl
8994d1f98e
Simplifying CalculateFilesChecksum API
...
There's a small side-effect: The scripting "checksum" command now prints file name only while before it printed the path as it was original specified in the command.
Source commit: 7594ed8befc67e4da3153cc8b1b711ab104db867
2022-07-14 00:57:43 +02:00
Martin Prikryl
b7dc14c954
Bug 2078: When transferring a growing file, after its original size is reached, the Session.FileTransferProgress event starts being triggered continuously
...
https://winscp.net/tracker/2078
Source commit: 3f6718b70e793a8d7972db88870716f18ec313cd
2022-05-21 01:00:35 +02:00
Martin Prikryl
1018b272ea
Bug 2044: Provide private key as string in .NET assembly
...
https://winscp.net/tracker/2044
Source commit: f305e417f5775d6acfbd1d6ffb7580eefa52dbe3
2022-01-07 17:02:48 +01:00
Martin Prikryl
c5a60526ed
Bug 2052: File masks relative to the root of an operation
...
https://winscp.net/tracker/2052
Source commit: 6c037285152e369af4f530849a09848f0b9be880
2021-12-15 01:01:06 +01:00
Martin Prikryl
0cebfe10f7
Interface for matching filenames only against a file mask
...
Among other to reduce confusing set of Matches overloads. Another benefit is that now all Matches overloads know, if the path is local or remote, what will be useful for upcoming relative/rooted path masks.
Source commit: a6a79218aeceb6dbc22a2ebe804effe277d43115
2021-12-09 01:15:07 +01:00
Martin Prikryl
ec22d33b1d
Factoring out IsTransfer
...
Source commit: e6155366a5349dcbe9e487f53bd7f2710eb43ec8
2021-07-14 00:47:56 +02:00
Martin Prikryl
00daaf7b98
Memory leak
...
Source commit: fc7c960d0bfc21c067fae53eba3fa7b679fae8fe
2021-04-09 00:48:42 +02:00
Martin Prikryl
f0c86d64d6
Fixing invalid logic from 5ec39a0c
...
Source commit: b91af2210ef3df96a6a18ff829a3ced925cb4449
2021-03-17 16:42:02 +01:00
Martin Prikryl
5ec39a0c4e
Generalizing Bug 1956: Some errors and information while opening a session in scripting were not logged
...
https://winscp.net/tracker/1956
(cherry picked from commit ae928efc1c )
Source commit: 09ab870b497a7c675c69f8ed514e17e3d5846ad8
2021-03-17 00:52:13 +01:00
Martin Prikryl
069aa20fb3
Bug 1948: Debug information is printed at the end of the scripting session when debug logging level is set even if logging is turned off
...
https://winscp.net/tracker/1948
Source commit: c46326e83e52349ccc6f037c18a59a85d855e099
2021-02-02 12:01:59 +01:00
Martin Prikryl
17d5e0d1e5
Bug 1916: Displaying, what directory is being read at the end of login to a server, in a tooltip
...
https://winscp.net/tracker/1916
(cherry picked from commit 14c15ca661 )
Source commit: 992bfc506be5e4b7973aaf6ce1c5c811495cf99b
2020-11-26 16:22:04 +01:00
Martin Prikryl
dbb67622c5
Bug 71: Case-sensitive synchronization
...
https://winscp.net/tracker/71
(cherry picked from commit b686736604 )
Source commit: 0c9278521e52c4af1d18c5de33f426c0fb1fdda0
2020-11-26 14:23:17 +01:00
Martin Prikryl
8730059803
With SFTP protocol files can be streamed from stdin in scripting (part of Bug 1738)
...
https://winscp.net/tracker/1738
(cherry picked from commit 6e5c55fab9 )
Source commit: 09f43cc5c62848e1505e228a99baa3ad003cfff5
2020-11-26 12:01:46 +01:00
Martin Prikryl
1fa88cca2a
Not calling FreeFileList for local files list.
...
(thanks to dynamic_cast in FreeFiles, it was not crashing)
(cherry picked from commit 6e60cf5d66 )
Source commit: e587d884892c9226cf22818c22200ef331485af7
2020-11-26 11:53:39 +01:00
Martin Prikryl
cebb4e2a67
With SFTP protocol files can be streamed to stdout in scripting (part of Bug 1738)
...
https://winscp.net/tracker/1738
(cherry picked from commit 891e603d76 )
Source commit: 3f802e465066617a548a7b73d3b4cab654553b69
2020-11-26 11:46:19 +01:00
Martin Prikryl
9d02c4f0ce
Convenience method Session.RemoveFile
...
Source commit: c7e3a0866633669f2e08fe6516042f59707843ad
2019-12-07 01:00:41 +01:00
Martin Prikryl
55a3b5b2d6
Factoring out TOptions::Parse
...
Source commit: 2f534e0c3c46af8c6ef25e6a64ad5066e6432692
2019-10-11 01:02:51 +02:00
Martin Prikryl
f500b385aa
Bug 150: Resolve local environment variables in initial session local path
...
https://winscp.net/tracker/150
Source commit: c1f9f2032c2a82e6d23d27c0bfcca0af5a95b488
2019-09-10 00:44:05 +02:00
Martin Prikryl
4c0917b517
When using a scripting console interactively, not warning about opening a session from a command-line or using a stored site
...
Source commit: be2b4d46dd2230a7e8b4f07f35274c0551c9bfdd
2019-09-05 01:02:22 +02:00
Martin Prikryl
a62f0274e4
Estimating time to finish directory comparison before synchronization based on previous comparisons of the same folders
...
Source commit: 01df1bed1a6df6d014df2151b6c9c08d3d860eb8
2019-06-27 01:08:36 +02:00
Martin Prikryl
fe24c90abb
Convenience methods Session.PutFileToDirectory, Session.PutFilesToDirectory, Session.GetFileToDirectory and Session.GetFilesToDirectory
...
Source commit: 0f89d088a94eeeaecbc4af11862542df9ea28667
2019-06-13 01:03:53 +02:00
Martin Prikryl
5ca817de64
Bug 1731: Raw transfer settings are incorrectly processed with synchronize command
...
https://winscp.net/tracker/1731
Source commit: eca8afcfe8687c55c8ac7fc1e23cefe32903de8d
2019-03-30 01:33:33 +01:00