Cassondra Foesch
aee72c4006
Guard against accidental io.EOFs
2021-04-13 10:10:27 +00:00
Cassondra Foesch
bc27e0c607
Merge pull request #425 from pkg/bug/write-to-unexpected-channel-closed
...
[Bugfix] WriteTo write work channel should never be closed…
2021-04-13 09:36:23 +00:00
Nicola Murino
16ca7e3032
Merge pull request #428 from drakkan/readfrom
...
ReadFrom: check also Size and Stat interfaces to calculate the size
2021-04-12 17:04:12 +02:00
Nicola Murino
6782c5448f
ReadFrom: check also Size and Stat interfaces to calculate the size
2021-04-11 18:14:59 +02:00
Cassondra Foesch
2c3f761948
bugfix: these channels should never be closed
2021-03-29 22:47:07 +00:00
Nicola Murino
f5f52ff56b
Merge pull request #419 from greatroar/fix-recv-panic
...
Fix panic when connection dropped in the middle of the sid
2021-03-23 21:49:58 +01:00
Nicola Murino
c2220a69b3
really fix the fuzzer
2021-03-23 21:47:04 +01:00
Nicola Murino
ec19f0847c
fuzz: rename sink to sinkfuzz
...
sink is already defined in client_test
2021-03-23 08:20:45 +01:00
Cassondra Foesch
96bf4d30dc
Merge pull request #422 from greatroar/cleanup
...
Minor cleanup
2021-03-21 13:12:55 +00:00
greatroar
7a28771c60
Lowercase error messages
2021-03-20 20:35:04 +01:00
greatroar
32b9d99cf4
Fix typos in private identifiers
2021-03-20 20:35:04 +01:00
greatroar
95591b2015
Remove unnecessary TeeReader from readHash
2021-03-20 11:43:59 +01:00
Cassondra Foesch
d26c4bc2a7
Merge pull request #421 from pkg/benchmarks-and-errors
...
Improve benchmarks and errors
2021-03-20 03:11:49 +00:00
Cassondra Foesch
addaabd30b
give the bytes.Buffer a preallocated slice to use for less variance
2021-03-17 20:18:50 +00:00
Cassondra Foesch
91163e4463
errors.Errorf over fmt.Errorf
2021-03-17 20:17:55 +00:00
Cassondra Foesch
32f98f3047
split benchmark and benchmark_w_memprofile, include memprofile files to gitignore
2021-03-17 20:17:15 +00:00
Cassondra Foesch
c6518c34c4
Merge pull request #420 from greatroar/chmod-setfstat
...
Implement File.Chmod via setfstat
2021-03-17 17:56:06 +00:00
greatroar
846e27dc7f
Implement File.Chmod via setfstat
2021-03-17 18:50:51 +01:00
Cassondra Foesch
325cdac782
Add convenient benchmark Makefile rule
2021-03-17 14:57:00 +00:00
Cassondra Foesch
b22b9e472e
remove writeToBuffer, the bytes.Buffer.Grow I saw in the memprofile was elsewhere
2021-03-17 13:18:17 +00:00
Cassondra Foesch
39e1161d12
address my own code review comments
2021-03-17 12:05:00 +00:00
Cassondra Foesch
f1e28f8a88
Improve benchmarks and errors
2021-03-17 11:03:51 +00:00
Cassondra Foesch
460ad57385
Merge pull request #416 from greatroar/match-cleanup
...
Clean up matching/globbing code
2021-03-16 01:20:24 +00:00
greatroar
d3695c2587
Fix Glob handling of backslashes
...
\m\a\t\c\h\.\g\o would be interpreted as a literal path, because the
backslash was missing in the check.
2021-03-15 18:11:02 +01:00
greatroar
413dd37571
Clean up matching/globbing code
...
getEsc, scanChunk and matchChunk were unused leftovers from the old
implementation, removed in 4f3e725e88
.
isPathSeparator contained a useless cast to string.
The documentation (copied from path/filepath) referred to a Separator
constant, which is not present in the package.
Join, Split and Match are now explicitly marked as aliases for standard
library functions and refer to stdlib docs for details.
2021-03-15 18:10:43 +01:00
greatroar
053574d9eb
Fix panic when connection dropped in the middle of the sid
2021-03-15 18:01:38 +01:00
Cassondra Foesch
6181f5c673
Merge pull request #414 from greatroar/chmod-bits
...
Support os.Mode{Setuid,Setgid,Sticky} in Chmod
2021-03-15 09:58:20 +00:00
Cassondra Foesch
6c0c9a9e85
Merge pull request #417 from pkg/a-better-buffer-pool
...
A simpler bytes buffer pool
2021-03-15 09:51:10 +00:00
greatroar
2573693ec5
Support os.Mode{Setuid,Setgid,Sticky} in Chmod
...
Previously, these bits were ignored by Chmod, which sent the numerical
value of the mode argument as-is to the server. As a result, callers had
to supply POSIX values for setuid, setgid and sticky to Chmod.
The new version supports both the POSIX values and the Go values.
Also added a note to the docs to clarify that the umask is not
subtracted from the mode, and why that is. The only portable way to get
the umask is to set it, then reset it, but that's racy. On Linux, we
could parse /proc/self/status, but that doesn't work portably and will
fail where /proc is not available (some Docker containers, notably).
2021-03-12 16:17:56 +01:00
Cassondra Foesch
c34ea374a2
A simpler bytes buffer pool
2021-03-12 15:14:27 +00:00
Nicola Murino
e164c76a12
Merge pull request #413 from greatroar/mkdirall-slash
...
Check for '/', not os.IsPathSeparator, in MkdirAll
2021-03-11 21:39:17 +01:00
Nicola Murino
df861a8348
Merge pull request #411 from drakkan/fuzz
...
client fix potential crash if we receive a short packet
2021-03-11 21:38:59 +01:00
Nicola Murino
25e9e632b3
client: add a test case for init packet too short
2021-03-11 19:56:45 +01:00
greatroar
9bd6912a11
Check for '/', not os.IsPathSeparator, in MkdirAll
...
The SFTP protocol uses '/' as the path separator, always.
2021-03-11 00:22:17 +01:00
Nicola Murino
23462f6cd7
client fix potential crash if we receive a short packet
2021-03-10 12:26:09 +01:00
Nicola Murino
5b7da38a9c
Merge pull request #410 from pkg/export-realpath
...
Export RealPath for potential client use
2021-03-06 12:44:23 +01:00
Cassondra Foesch
714bd5db80
+godoc
2021-03-06 09:03:37 +00:00
Cassondra Foesch
b83052b538
Export RealPath for potential client use
2021-03-06 08:48:23 +00:00
Nicola Murino
f50ad19e9f
Merge pull request #408 from drakkan/345
...
add an option to disable concurrent reads
2021-03-05 22:37:51 +01:00
Nicola Murino
c539fdb9b4
improve readAtSequential as for review
2021-03-05 17:10:39 +01:00
Nicola Murino
e1e59da6e3
add readAtSequential: used if concurrent reads are disabled ...
...
... and the requested buffer is bigger than maxPacket
2021-03-05 15:04:17 +01:00
Nicola Murino
5f2c008b8e
add an option to disable concurrent reads
...
Fixs #345
2021-02-23 19:13:26 +01:00
Nicola Murino
a88961882e
remove some redundant types
2021-02-22 22:29:35 +01:00
Nicola Murino
696db1cc39
CI: add Go 1.16 and remove 1.14
2021-02-22 16:33:20 +01:00
Nicola Murino
b8102da57e
Merge pull request #397 from pkg/more-optimization
...
More optimization
2021-02-22 16:23:08 +01:00
Cassondra Foesch
861a8eaf5c
pointer receivers and statusFromError(uint32, error)
2021-02-22 12:11:42 +00:00
Cassondra Foesch
1d73fd92d5
fix typo, error message is now two-way greppable
2021-02-22 12:04:43 +00:00
Cassondra Foesch
c6f90f0596
polishing done?
2021-02-22 12:04:43 +00:00
Cassondra Foesch
fc15699691
fixed concurrent writes, mid-polish
2021-02-22 12:04:43 +00:00
Cassondra Foesch
0be6950c0e
fix comments and variable names to reflect Write instead of Read
2021-02-22 12:04:43 +00:00