File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -120,10 +120,9 @@ defmodule Mix.Sync.Lock do
120120  end 
121121
122122  defp  base_path  do 
123+     # We include user in the dir to avoid permission conflicts across users 
123124    user  =  System . get_env ( "USER" ,  "default" ) 
124-     path  =  Path . join ( [ System . tmp_dir! ( ) ,  "mix_lock_#{ Base . url_encode64 ( user ,  padding:  false ) }  " ] ) 
125-     File . mkdir_p! ( path ) 
126-     path 
125+     Path . join ( System . tmp_dir! ( ) ,  "mix_lock_#{ Base . url_encode64 ( user ,  padding:  false ) }  " ) 
127126  end 
128127
129128  defp  lock_disabled? ( ) ,  do:  System . get_env ( "MIX_OS_CONCURRENCY_LOCK" )  in  ~w( 0 false)  
Original file line number Diff line number Diff line change @@ -272,18 +272,17 @@ defmodule Mix.Sync.PubSub do
272272
273273  defp  hash ( key ) ,  do:  :erlang . md5 ( key ) 
274274
275-   defp  base_path  do 
276-     user  =  System . get_env ( "USER" ,  "default" ) 
277-     path  =  Path . join ( [ System . tmp_dir! ( ) ,  "mix_pubsub_#{ Base . url_encode64 ( user ,  padding:  false ) }  " ] ) 
278-     File . mkdir_p! ( path ) 
279-     path 
280-   end 
281- 
282275  defp  path ( hash )  do 
283276    hash  =  Base . url_encode64 ( hash ,  padding:  false ) 
284277    Path . join ( base_path ( ) ,  hash ) 
285278  end 
286279
280+   defp  base_path  do 
281+     # We include user in the dir to avoid permission conflicts across users 
282+     user  =  System . get_env ( "USER" ,  "default" ) 
283+     Path . join ( System . tmp_dir! ( ) ,  "mix_pubsub_#{ Base . url_encode64 ( user ,  padding:  false ) }  " ) 
284+   end 
285+ 
287286  defp  recv ( socket ,  size ,  timeout  \\  :infinity )  do 
288287    # eintr is "Interrupted system call". 
289288    with  { :error ,  :eintr }  <-  :gen_tcp . recv ( socket ,  size ,  timeout )  do 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments