1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-02 22:55:26 +02:00

[367424] [dstore] upload mechanism should provide backups of files

-amending the backup filename scheme to be .<filename>~ since the backup files should be hidden by default.
This commit is contained in:
David McKnight 2012-01-20 19:11:12 +00:00
parent 68ef5d2627
commit c0a89ce0a8

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2002, 2011 IBM Corporation and others.
* Copyright (c) 2002, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -93,7 +93,7 @@ public class ByteStreamHandler implements IByteStreamHandler
String doBackups = System.getProperty("backupfiles"); //$NON-NLS-1$
if (doBackups == null || doBackups.equals("true")){ //$NON-NLS-1$
// backup the file first
file.renameTo(new File(fileName+"~")); //$NON-NLS-1$
file.renameTo(new File('.'+fileName+"~")); //$NON-NLS-1$
}
}