mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	mkalias() now also works for folders. Fixes bug #515830.
This commit is contained in:
		
							parent
							
								
									b5255114d1
								
							
						
					
					
						commit
						a2168eceb0
					
				
					 1 changed files with 7 additions and 3 deletions
				
			
		|  | @ -34,9 +34,13 @@ def mkalias(src, dst, relative=None): | |||
| 		alias = srcfss.NewAlias(relativefss) | ||||
| 	else: | ||||
| 		alias = srcfss.NewAlias() | ||||
| 	srcfinfo = srcfss.GetFInfo() | ||||
| 
 | ||||
| 	Res.FSpCreateResFile(dstfss, srcfinfo.Creator, srcfinfo.Type, -1) | ||||
| 	 | ||||
| 	if os.path.isdir(src): | ||||
| 		cr, tp = 'MACS', 'fdrp' | ||||
| 	else: | ||||
| 		cr, tp = srcfss.GetCreatorType() | ||||
| 	 | ||||
| 	Res.FSpCreateResFile(dstfss, cr, tp, -1) | ||||
| 	h = Res.FSpOpenResFile(dstfss, 3) | ||||
| 	resource = Res.Resource(alias.data) | ||||
| 	resource.AddResource('alis', 0, '') | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Just van Rossum
						Just van Rossum