[patch]: move refresh right before loading patch content

* not in EDT;
* support changed patch file content outside project dir between dialog showing;
This commit is contained in:
Nadya Zabrodina
2016-08-12 16:57:18 +03:00
parent 79fc0fa4c5
commit a2a5c00b2f
2 changed files with 1 additions and 1 deletions
@@ -398,6 +398,7 @@ public class ApplyPatchDifferentiatedDialog extends DialogWrapper {
private static PatchReader loadPatches(@NotNull VirtualFile patchFile) {
PatchReader reader;
try {
patchFile.refresh(false, false);
reader = PatchVirtualFileReader.create(patchFile);
}
catch (IOException e) {
@@ -71,7 +71,6 @@ public class UnshelveWithDialogAction extends DumbAwareAction {
VcsBalloonProblemNotifier.showOverChangesView(project, "Can not find path file", MessageType.ERROR);
return;
}
virtualFile.refresh(false, false);
List<ShelvedBinaryFilePatch> binaryShelvedPatches =
ContainerUtil.map(changeList.getBinaryFiles(), ShelvedBinaryFilePatch::new);
final ApplyPatchDifferentiatedDialog dialog =