some minor bugfixes
This commit is contained in:
parent
e9f89da36f
commit
9c8fe4ba1e
3 changed files with 7 additions and 6 deletions
4
.vscode/launch.json
vendored
4
.vscode/launch.json
vendored
|
@ -9,8 +9,8 @@
|
||||||
"program": "${workspaceFolder}/main.go",
|
"program": "${workspaceFolder}/main.go",
|
||||||
"args": [
|
"args": [
|
||||||
"--verbose",
|
"--verbose",
|
||||||
"--PASSWORD",
|
"--password",
|
||||||
"$velvet90",
|
"$Velvet90",
|
||||||
"--concurrency",
|
"--concurrency",
|
||||||
"12",
|
"12",
|
||||||
"--delay",
|
"--delay",
|
||||||
|
|
|
@ -16,14 +16,14 @@ func Initialize() {
|
||||||
for index := 1; index < len(os.Args); index++ {
|
for index := 1; index < len(os.Args); index++ {
|
||||||
arg := strings.ToLower(os.Args[index])
|
arg := strings.ToLower(os.Args[index])
|
||||||
if arg != "-v" && arg != "--verbose" {
|
if arg != "-v" && arg != "--verbose" {
|
||||||
arguments = append(arguments, arg)
|
arguments = append(arguments, os.Args[index])
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
setVerbose(true)
|
setVerbose(true)
|
||||||
}
|
}
|
||||||
var filteredArguments []string
|
var filteredArguments []string
|
||||||
for index := 0; index < len(arguments); index++ {
|
for index := 0; index < len(arguments); index++ {
|
||||||
switch arguments[index] {
|
switch strings.ToLower(arguments[index]) {
|
||||||
case "-h":
|
case "-h":
|
||||||
fallthrough
|
fallthrough
|
||||||
case "--help":
|
case "--help":
|
||||||
|
|
|
@ -175,9 +175,10 @@ func getTargetLocation(sourceFile string) string {
|
||||||
}
|
}
|
||||||
source, _ := strings.CutSuffix(settings.Source, "/*")
|
source, _ := strings.CutSuffix(settings.Source, "/*")
|
||||||
if settings.SourceIsRemote() {
|
if settings.SourceIsRemote() {
|
||||||
_, source, _ = strings.Cut(settings.Source, ":")
|
_, source, _ = strings.Cut(source, ":")
|
||||||
|
source = filepath.Dir(source)
|
||||||
}
|
}
|
||||||
return filepath.Join(settings.Target, strings.Replace(sourceFile, filepath.Dir(source), "", 1))
|
return filepath.Join(settings.Target, strings.Replace(sourceFile, source, "", 1))
|
||||||
}
|
}
|
||||||
|
|
||||||
func createProgressBar(barcontainer *mpb.Progress, name string, size int64, max int64, priority int, total bool) *mpb.Bar {
|
func createProgressBar(barcontainer *mpb.Progress, name string, size int64, max int64, priority int, total bool) *mpb.Bar {
|
||||||
|
|
Loading…
Reference in a new issue