Fixed directory does not exist bug.
This commit is contained in:
		
							parent
							
								
									76c69ca3ec
								
							
						
					
					
						commit
						35aaf8824f
					
				@ -45,7 +45,7 @@ async def start_ssh_server(app,host,port):
 | 
				
			|||||||
    logger.info("Starting SFTP server setup")
 | 
					    logger.info("Starting SFTP server setup")
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    host_key_path = Path("drive") / ".ssh" / "sftp_server_key"
 | 
					    host_key_path = Path("drive") / ".ssh" / "sftp_server_key"
 | 
				
			||||||
    host_key_path.parent.mkdir(exist_ok=True)
 | 
					    host_key_path.parent.mkdir(exist_ok=True, parents=True)
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        if not host_key_path.exists():
 | 
					        if not host_key_path.exists():
 | 
				
			||||||
            logger.info(f"Generating new host key at {host_key_path}")
 | 
					            logger.info(f"Generating new host key at {host_key_path}")
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user