feat(py): keep a local timestamped copy of edited note before sending to server
This commit is contained in:
		
							parent
							
								
									1446be8ba6
								
							
						
					
					
						commit
						0c7fa3d714
					
				| 
						 | 
				
			
			@ -48,6 +48,7 @@ def editnote(note):
 | 
			
		|||
	newcontent = readtextfile("data/" + filename(note) )
 | 
			
		||||
 | 
			
		||||
	if newcontent != content:
 | 
			
		||||
		subprocess.call(["cp", "data/" + filename(note), "data/" + filename(note) + str(time.time())])
 | 
			
		||||
		subprocess.call(settings["commands"]["diff"] + ["data/" + filename(note) + ".bak", "data/" + filename(note)])
 | 
			
		||||
		note["content"] = newcontent
 | 
			
		||||
		data.remove(note)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue