From cbe35542526767ede392ce011ec2081796f8957d Mon Sep 17 00:00:00 2001 From: Gnarwhal Date: Wed, 31 Jul 2024 15:32:51 +0000 Subject: [PATCH] Don't share directories and give each upload a unique id --- sshare | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sshare b/sshare index 54e74db..8236ff0 100755 --- a/sshare +++ b/sshare @@ -3,18 +3,20 @@ import getpass import importlib.util import os +import time import subprocess import sys def main(): config = Config() + id = time.time_ns() + subprocess.run([ "scp", - "-r", f"-P {config.ssh_port}", f"/home/gnarwhal/Pictures/Screenshots/Screenshot from 2024-07-31 06-34-57.png", - f"{config.ssh_user}@{config.ssh_domain}:{config.ssh_dir}", + f"{config.ssh_user}@{config.ssh_domain}:{config.ssh_dir}/{id}.png", ])