mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
web client: add share mode read/write
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -6,8 +6,10 @@ import (
|
||||
"crypto/tls"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/fs"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
@@ -3463,7 +3465,7 @@ func getExitCodeScriptContent(exitCode int) []byte {
|
||||
|
||||
func createTestFile(path string, size int64) error {
|
||||
baseDir := filepath.Dir(path)
|
||||
if _, err := os.Stat(baseDir); os.IsNotExist(err) {
|
||||
if _, err := os.Stat(baseDir); errors.Is(err, fs.ErrNotExist) {
|
||||
err = os.MkdirAll(baseDir, os.ModePerm)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user