Add os.path.abspath so .download saves to the current directory by default
This commit is contained in:
		
							parent
							
								
									c838aefc58
								
							
						
					
					
						commit
						2411df9e81
					
				| 
						 | 
					@ -48,7 +48,7 @@ async def upload(client, message):
 | 
				
			||||||
@log_errors
 | 
					@log_errors
 | 
				
			||||||
@public_log_errors
 | 
					@public_log_errors
 | 
				
			||||||
async def download(client, message):
 | 
					async def download(client, message):
 | 
				
			||||||
    file = os.path.expanduser(' '.join(message.command[1:]) or './')
 | 
					    file = os.path.abspath(os.path.expanduser(' '.join(message.command[1:]) or './'))
 | 
				
			||||||
    if os.path.isdir(file):
 | 
					    if os.path.isdir(file):
 | 
				
			||||||
        file = os.path.join(file, '')
 | 
					        file = os.path.join(file, '')
 | 
				
			||||||
    available_media = ("audio", "document", "photo", "sticker", "animation", "video", "voice", "video_note")
 | 
					    available_media = ("audio", "document", "photo", "sticker", "animation", "video", "voice", "video_note")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue