Skip to content

Commit

Permalink
[INTERNAL] simplified FileUtils code
Browse files Browse the repository at this point in the history
Removed dead backup method.

All resource operations will no longer try to force their operations and
so preventing data loss. Also removed the option to remove the read-only
flags when modifying data as there is mostly a reason such resources are
set to read only.

Also removed the whole workspace run stuff as it was mostly only one
file operation that was executed inside the runnable. The other multi
file operations are folder creation operations and those operations are
somewhat unlikely to be in conflict with other operations so there is
also no need to run them atomically.


Change-Id: Ia77ad3cff054c73101b7792d104ee199d9828547
Reviewed-on: http://saros-build.imp.fu-berlin.de/gerrit/1919
Tested-by: Jenkins CI
Reviewed-by: Stefan Rossbach <srossbach@arcor.de>
  • Loading branch information
srossbach committed Aug 22, 2014
1 parent 2f555dd commit 3adb19a
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 280 deletions.
Expand Up @@ -656,8 +656,7 @@ private void handleFileCreation(FileActivity activity) throws CoreException {
byte[] newContent = activity.getContent();

if (!Arrays.equals(newContent, actualContent)) {
FileUtils.writeFile(new ByteArrayInputStream(newContent), file,
new NullProgressMonitor());
FileUtils.writeFile(new ByteArrayInputStream(newContent), file);
} else {
log.debug("FileActivity " + activity + " dropped (same content)");
}
Expand Down

0 comments on commit 3adb19a

Please sign in to comment.