mirror of
https://github.com/HACKERALERT/Picocrypt.git
synced 2025-01-01 20:32:17 +00:00
Update v1.12.py
This commit is contained in:
parent
3fa104b028
commit
c0f0cc8ab9
1 changed files with 12 additions and 7 deletions
|
@ -213,19 +213,23 @@ orLabel = tkinter.ttk.Label(
|
||||||
orLabel.place(x=360,y=68)
|
orLabel.place(x=360,y=68)
|
||||||
|
|
||||||
def saveAs():
|
def saveAs():
|
||||||
global mode
|
global mode,onlyFiles,onlyFolders
|
||||||
dummy.focus()
|
dummy.focus()
|
||||||
encryptTypes = (("Picocrypt Volume","*.pcv"),("All Files","*.*"))
|
if inputFile:
|
||||||
decryptTypes = (("All Files","*.*"),("Picocrypt Volume","*.pcv"))
|
saveDir = dirname(inputFile)
|
||||||
|
elif onlyFiles:
|
||||||
|
saveDir = dirname(onlyFiles[0])
|
||||||
|
else:
|
||||||
|
saveDir = Path(onlyFolders[0]).parent.absolute()
|
||||||
tmp = asksaveasfilename(
|
tmp = asksaveasfilename(
|
||||||
initialdir=expanduser("~"),
|
initialdir=saveDir,
|
||||||
initialfile=(
|
initialfile=(
|
||||||
basename(inputFile)[:-4] if mode=="decrypt" else basename(inputFile)
|
basename(inputFile)[:-4] if mode=="decrypt" else basename(inputFile)+".pcv"
|
||||||
),
|
),
|
||||||
filetypes=((encryptTypes) if mode=="encrypt" else (decryptTypes))
|
confirmoverwrite=True
|
||||||
)
|
)
|
||||||
outputInput.delete(0,tkinter.END)
|
outputInput.delete(0,tkinter.END)
|
||||||
outputInput.insert(0,tmp)
|
outputInput.insert(0,(tmp if mode=="decrypt" else tmp[:-4]))
|
||||||
saveAsBtn = tkinter.ttk.Button(
|
saveAsBtn = tkinter.ttk.Button(
|
||||||
tk,
|
tk,
|
||||||
text="Save as",
|
text="Save as",
|
||||||
|
@ -671,6 +675,7 @@ def filesDragged(draggedFiles):
|
||||||
tmp = Path(onlyFolders[0]).parent.absolute()
|
tmp = Path(onlyFolders[0]).parent.absolute()
|
||||||
tmp = pathJoin(tmp,"Encrypted.zip")
|
tmp = pathJoin(tmp,"Encrypted.zip")
|
||||||
tmp = tmp.replace("\\","/")
|
tmp = tmp.replace("\\","/")
|
||||||
|
inputFile = tmp
|
||||||
outputInput.insert(0,tmp)
|
outputInput.insert(0,tmp)
|
||||||
suffix = " (will encrypt)"
|
suffix = " (will encrypt)"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue