mirror of
https://github.com/schollz/croc.git
synced 2024-12-18 03:01:31 +03:00
only compress if its not a directory
This commit is contained in:
parent
c6374da410
commit
232f3375b1
@ -168,7 +168,7 @@ func receive(c *websocket.Conn, codephrase string, noPrompt bool, useStdout bool
|
||||
}
|
||||
|
||||
// do decompression
|
||||
if fstats.IsCompressed {
|
||||
if fstats.IsCompressed && !fstats.IsDir {
|
||||
decrypted = compress.Decompress(decrypted)
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ func send(c *websocket.Conn, fname string, codephrase string, useCompression boo
|
||||
if bytesread > 0 {
|
||||
// do compression
|
||||
var compressedBytes []byte
|
||||
if useCompression {
|
||||
if useCompression && !fstats.IsDir {
|
||||
compressedBytes = compress.Compress(buffer[:bytesread])
|
||||
} else {
|
||||
compressedBytes = buffer[:bytesread]
|
||||
|
Loading…
Reference in New Issue
Block a user