mirror of
https://github.com/celogeek/piwigo-cli.git
synced 2025-05-24 17:52:36 +02:00
remove escaping for quote
not required anymore
This commit is contained in:
parent
7969ec305f
commit
b8619306e9
@ -50,7 +50,7 @@ func ArgsToForm(args []string) (*url.Values, error) {
|
|||||||
if len(r) != 2 {
|
if len(r) != 2 {
|
||||||
return nil, errors.New("args should be key=value")
|
return nil, errors.New("args should be key=value")
|
||||||
}
|
}
|
||||||
params.Add(r[0], strings.ReplaceAll(r[1], "'", `\'`))
|
params.Add(r[0], r[1])
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/celogeek/piwigo-cli/internal/piwigo/piwigotools"
|
"github.com/celogeek/piwigo-cli/internal/piwigo/piwigotools"
|
||||||
@ -176,7 +175,7 @@ func (p *Piwigo) ScanTree(
|
|||||||
category = &piwigotools.Category{}
|
category = &piwigotools.Category{}
|
||||||
p.mu.Lock()
|
p.mu.Lock()
|
||||||
err = p.Post("pwg.categories.add", &url.Values{
|
err = p.Post("pwg.categories.add", &url.Values{
|
||||||
"name": []string{strings.ReplaceAll(dirname, "'", `\'`)},
|
"name": []string{dirname},
|
||||||
"parent": []string{fmt.Sprint(parentCategoryId)},
|
"parent": []string{fmt.Sprint(parentCategoryId)},
|
||||||
}, &category)
|
}, &category)
|
||||||
p.mu.Unlock()
|
p.mu.Unlock()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user