kopia lustrzana https://github.com/miklobit/TiddlyWiki5
				
				
				
			Avoid deprecated new Buffer() usage
See https://alexatnet.com/node-js-10-important-changes/#buffer-1 > Uses of new Buffer() and Buffer() outside of the node_modules directory will now emit a runtime deprecation warning. More details: https://nodejs.org/api/buffer.html#buffer_buffer_from_buffer_alloc_and_buffer_allocunsafesingle-tiddler-mode
							rodzic
							
								
									2e51f08bef
								
							
						
					
					
						commit
						bacf500d50
					
				| 
						 | 
				
			
			@ -57,7 +57,7 @@ var FILE_BUFFER_LENGTH = 64 * 1024,
 | 
			
		|||
exports.copyFile = function(srcPath,dstPath) {
 | 
			
		||||
	// Create buffer if required
 | 
			
		||||
	if(!fileBuffer) {
 | 
			
		||||
		fileBuffer = new Buffer(FILE_BUFFER_LENGTH);
 | 
			
		||||
		fileBuffer = Buffer.alloc(FILE_BUFFER_LENGTH);
 | 
			
		||||
	}
 | 
			
		||||
	// Create any directories in the destination
 | 
			
		||||
	$tw.utils.createDirectory(path.dirname(dstPath));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -712,7 +712,7 @@ exports.base64Decode = function(string64) {
 | 
			
		|||
		// TODO
 | 
			
		||||
		throw "$tw.utils.base64Decode() doesn't work in the browser";
 | 
			
		||||
	} else {
 | 
			
		||||
		return (new Buffer(string64,"base64")).toString();
 | 
			
		||||
		return Buffer.from(string64,"base64").toString();
 | 
			
		||||
	}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue