Changeset 718 for xmlTools


Ignore:
Timestamp:
Mar 21, 2013, 11:53:30 AM (12 years ago)
Author:
s10k
Message:

reverted the no backup test

Location:
xmlTools/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • xmlTools/trunk/posUpdate/Program.cs

    r710 r718  
    4545        static void Main(string[] args)
    4646        {
    47             //long ticksThisTime = 0;
    48             //System.Diagnostics.Stopwatch timePerParse = System.Diagnostics.Stopwatch.StartNew();
    49 
    50          
    51            
    5247            try
    5348            {
     
    5954                printAppError(appErrors.ERROR_PARAMS, "Error processing parameters:\n" + e.ToString());
    6055            }
    61 
    62            
    63 
    64             //// Stop the timer, and save the
    65             //// elapsed ticks for the operation.
    66 
    67             //timePerParse.Stop();
    68             //ticksThisTime = timePerParse.ElapsedTicks;
    69             //Console.WriteLine(ticksThisTime);
    70             //Console.ReadLine();
    7156        }
    7257    }
  • xmlTools/trunk/posUpdate/Util.cs

    r710 r718  
    1919        static public bool backupFile(string file)
    2020        {
    21             //try
    22             //{
    23             //    System.IO.File.Copy(file, file + ".bak", false); //make a backup first //false is to not override already created backups
    24             //}
    25             //catch (Exception e)
    26             //{
    27             //    Program.printAppError(Program.appErrors.BACKUPS_ALREADY_EXISTS, "Couldn't backup file " + file + " :\n" + e.Message);
    28             //    return false;
    29             //}
     21            try
     22            {
     23                System.IO.File.Copy(file, file + ".bak", false); //make a backup first //false is to not override already created backups
     24            }
     25            catch (Exception e)
     26            {
     27                Program.printAppError(Program.appErrors.BACKUPS_ALREADY_EXISTS, "Couldn't backup file " + file + " :\n" + e.Message);
     28                return false;
     29            }
    3030            return true;
    3131        }
Note: See TracChangeset for help on using the changeset viewer.