Allow directory bookmarks to be relative to Data_directory
see http://pulkomandy.tk/projects/GrafX2/ticket/45 Still to do : the "Set Rel" which is the difficult part :) Also it may be better to use Program_directory instead of Data_directory
This commit is contained in:
		
							parent
							
								
									52ccd396d5
								
							
						
					
					
						commit
						175ea62b02
					
				@ -2330,6 +2330,17 @@ byte Button_Load_or_Save(T_Selector_settings *settings, byte load, T_IO_Context
 | 
			
		||||
          directory_to_change_to = Selector_filename;
 | 
			
		||||
 | 
			
		||||
        // We must enter the directory
 | 
			
		||||
      
 | 
			
		||||
        if (directory_to_change_to[0] == '.' &&
 | 
			
		||||
            (directory_to_change_to[1] == '/' || directory_to_change_to[1] == '\\' ||
 | 
			
		||||
            (directory_to_change_to[1] == '.' &&
 | 
			
		||||
             (directory_to_change_to[2] == '/' || directory_to_change_to[2] == '\\')))) // Relative path
 | 
			
		||||
        {
 | 
			
		||||
          GFX2_Log(GFX2_DEBUG, "Relative bookmark %s. Change to %s first\n",
 | 
			
		||||
                   directory_to_change_to, Data_directory);
 | 
			
		||||
          Change_directory(Data_directory);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (Change_directory(directory_to_change_to) == 0)
 | 
			
		||||
        {
 | 
			
		||||
          short pos;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user