Add cache.disable logic (oops...)
This commit is contained in:
		
							parent
							
								
									3b1db9ece2
								
							
						
					
					
						commit
						959c3c9c9b
					
				
					 1 changed files with 11 additions and 7 deletions
				
			
		
							
								
								
									
										18
									
								
								matrix-send
									
										
									
									
									
								
							
							
						
						
									
										18
									
								
								matrix-send
									
										
									
									
									
								
							|  | @ -340,10 +340,12 @@ if not login.token then | ||||||
| 		login.token = t.access_token | 		login.token = t.access_token | ||||||
| 
 | 
 | ||||||
| 		-- Cache the access token | 		-- Cache the access token | ||||||
| 		mkdir(cache.location) | 		if not cache.disable then | ||||||
| 		cf = io.open(cache.location .. "/token", 'w+') | 			mkdir(cache.location) | ||||||
| 		cf:write(login.token) | 			cf = io.open(cache.location .. "/token", 'w+') | ||||||
| 		cf:close() | 			cf:write(login.token) | ||||||
|  | 			cf:close() | ||||||
|  | 		end | ||||||
| 	end | 	end | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
|  | @ -358,6 +360,8 @@ if t.error then | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
| -- Increment txnid and cache | -- Increment txnid and cache | ||||||
| txnidf = io.open(cache.location .. "/txnid", 'w+') | if not cache.disable then | ||||||
| txnidf:write(txnid + 1) | 	txnidf = io.open(cache.location .. "/txnid", 'w+') | ||||||
| txnidf:close() | 	txnidf:write(txnid + 1) | ||||||
|  | 	txnidf:close() | ||||||
|  | end | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue