Aggiunta la possibilita' di saltare i files con flag oltre 10000
Significa aggiorna solo il tracciato.Riportata anche su R9604. git-svn-id: svn://10.65.10.50/trunk@3682 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									ab005b9443
								
							
						
					
					
						commit
						7d7ba87420
					
				@ -657,6 +657,10 @@ void TManutenzione_app::delete_riga ()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void TManutenzione_app::update_dir()
 | 
					void TManutenzione_app::update_dir()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					  // Particolare significato dei flags oltre i 10000:
 | 
				
			||||||
 | 
					  // trattasi di files PRASSI, (ad esempio i cespiti) che da noi non vengono toccati,
 | 
				
			||||||
 | 
					  // in modo da evitare colpe inutili. Noi aggiorniamo solo i tracciati su dir e trc,
 | 
				
			||||||
 | 
					  // ma il file fisico manco lo tocchiamo!!
 | 
				
			||||||
  const TString pref(prefix().name());
 | 
					  const TString pref(prefix().name());
 | 
				
			||||||
  const bool is_com = prefix().is_com();
 | 
					  const bool is_com = prefix().is_com();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -694,7 +698,7 @@ void TManutenzione_app::update_dir()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    bool towrite = FALSE;
 | 
					    bool towrite = FALSE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//    long flags = ds.flags();
 | 
					    const long flags = ds.flags();
 | 
				
			||||||
//    word len = ds.len();
 | 
					//    word len = ds.len();
 | 
				
			||||||
//    prefix().set(pref);
 | 
					//    prefix().set(pref);
 | 
				
			||||||
    d.get(i);
 | 
					    d.get(i);
 | 
				
			||||||
@ -730,13 +734,13 @@ void TManutenzione_app::update_dir()
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
            else
 | 
					            else
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              if (!yesno_box("Il file %d non puo' essere aperto: errore %d. Continuo?",i,err))
 | 
					              if (flags < 10000L && !yesno_box("Il file %d non puo' essere aperto: errore %d. Continuo?",i,err))
 | 
				
			||||||
                stop_run();
 | 
					                stop_run();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
          else
 | 
					          else
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            if (to_create)
 | 
					            if (flags < 10000L && to_create )
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              remove(d.filename());
 | 
					              remove(d.filename());
 | 
				
			||||||
              TToken_string idx_names;
 | 
					              TToken_string idx_names;
 | 
				
			||||||
@ -763,7 +767,7 @@ void TManutenzione_app::update_dir()
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      if (fexist(fs) && (fd != fs))
 | 
					      if (flags < 10000L && fexist(fs) && (fd != fs))
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        bool ok = TRUE;
 | 
					        bool ok = TRUE;
 | 
				
			||||||
        TFilename path(fd.path());
 | 
					        TFilename path(fd.path());
 | 
				
			||||||
@ -903,8 +907,11 @@ void TManutenzione_app::convert_dir()
 | 
				
			|||||||
//    prefix().set("");
 | 
					//    prefix().set("");
 | 
				
			||||||
    const TTrec & rs = (const TTrec &) _recs[i];
 | 
					    const TTrec & rs = (const TTrec &) _recs[i];
 | 
				
			||||||
    const TDir & ds = (const TDir &) _dirs[i];
 | 
					    const TDir & ds = (const TDir &) _dirs[i];
 | 
				
			||||||
 | 
					    const long flags = ds.flags();
 | 
				
			||||||
//    prefix().set(pref);
 | 
					//    prefix().set(pref);
 | 
				
			||||||
    if (ds.len() > 0)
 | 
					    if (ds.len() > 0)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      if (flags < 10000L)
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        TBaseisamfile b(i);
 | 
					        TBaseisamfile b(i);
 | 
				
			||||||
        const int module = abs((int)ds.flags());
 | 
					        const int module = abs((int)ds.flags());
 | 
				
			||||||
@ -921,6 +928,7 @@ void TManutenzione_app::convert_dir()
 | 
				
			|||||||
        TSystemisamfile f(i);
 | 
					        TSystemisamfile f(i);
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
        f.update(rs);
 | 
					        f.update(rs);
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
        if (f.status() == 8) // cio' significa che e' accaduto quasi l'irreparabile...
 | 
					        if (f.status() == 8) // cio' significa che e' accaduto quasi l'irreparabile...
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
@ -945,7 +953,7 @@ void TManutenzione_app::convert_dir()
 | 
				
			|||||||
               i == LF_PCON || i == LF_CAUSALI || i == LF_RCAUSALI)
 | 
					               i == LF_PCON || i == LF_CAUSALI || i == LF_RCAUSALI)
 | 
				
			||||||
             to_create = TRUE;
 | 
					             to_create = TRUE;
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
      if (to_create && has_module(module, CHK_DONGLE))
 | 
					        if (flags < 10000L && to_create && has_module(module, CHK_DONGLE))
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          d.get(i);
 | 
					          d.get(i);
 | 
				
			||||||
          TFilename s(d.filename());
 | 
					          TFilename s(d.filename());
 | 
				
			||||||
@ -958,7 +966,14 @@ void TManutenzione_app::convert_dir()
 | 
				
			|||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    else
 | 
					      else // altrimenti se i flags sono oltre i fatidici 10000...
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        TTrec r(rs);
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        r.put(i);
 | 
				
			||||||
 | 
					      }  
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    else // altrimenti se la dimensione del tracciato e' zero...
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      TTrec r(rs);
 | 
					      TTrec r(rs);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user