mirror of
https://github.com/HACKERALERT/Picocrypt.git
synced 2024-11-10 04:48:01 +00:00
Fix bug when deleting files
This commit is contained in:
parent
46a8642a50
commit
9c8b71f3f4
1 changed files with 5 additions and 2 deletions
|
@ -74,6 +74,7 @@ var showProgress bool
|
||||||
|
|
||||||
// Input and output files
|
// Input and output files
|
||||||
var inputFile string
|
var inputFile string
|
||||||
|
var inputFileOld string
|
||||||
var outputFile string
|
var outputFile string
|
||||||
var onlyFiles []string
|
var onlyFiles []string
|
||||||
var onlyFolders []string
|
var onlyFolders []string
|
||||||
|
@ -996,6 +997,7 @@ func work() {
|
||||||
fin.Close()
|
fin.Close()
|
||||||
}
|
}
|
||||||
fout.Close()
|
fout.Close()
|
||||||
|
inputFileOld = inputFile
|
||||||
inputFile = outputFile + ".pcv"
|
inputFile = outputFile + ".pcv"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1634,11 +1636,11 @@ func work() {
|
||||||
if recombine { // Remove each chunk
|
if recombine { // Remove each chunk
|
||||||
i := 0
|
i := 0
|
||||||
for {
|
for {
|
||||||
_, err := os.Stat(fmt.Sprintf("%s.%d", inputFile, i))
|
_, err := os.Stat(fmt.Sprintf("%s.%d", inputFileOld, i))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
os.Remove(fmt.Sprintf("%s.%d", inputFile, i))
|
os.Remove(fmt.Sprintf("%s.%d", inputFileOld, i))
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1701,6 +1703,7 @@ func resetUI() {
|
||||||
mode = ""
|
mode = ""
|
||||||
|
|
||||||
inputFile = ""
|
inputFile = ""
|
||||||
|
inputFileOld = ""
|
||||||
outputFile = ""
|
outputFile = ""
|
||||||
onlyFiles = nil
|
onlyFiles = nil
|
||||||
onlyFolders = nil
|
onlyFolders = nil
|
||||||
|
|
Loading…
Reference in a new issue