File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Top Open diff view settings Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Top Open diff view settings Original file line number Diff line number Diff line change 308308function  AttachCore :unset_directory (node , opts )
309309  local  old_dir  =  self :get_dir (node , true )
310310  node :set_dir ()
311-   local  new_dir  =  self :get_dir (node , true ) --  new dir potentially via parent nodes
311+   --  After removal, there might be a new DIR directory via inheritance.
312+   local  new_dir  =  self :get_dir_or_nil (node , true )
313+   if  not  new_dir  then 
314+     --  There is no parent node with a DIR property. Switch back to ID-based
315+     --  directory.
316+     new_dir  =  node :id_dir_get_or_create ()
317+   end 
312318  --  Ordering matters here: both `opts` should be evaluated before the
313319  --  operations (copy if desired, delete if desired) start.
314320  --- @param  do_copy ?  boolean 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments