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

[309813] RSE permits opening of file after access removed

This commit is contained in:
David McKnight 2010-04-22 14:09:00 +00:00
parent a596dc54a7
commit ffd7f58cf0

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2002, 2009 IBM Corporation and others. * Copyright (c) 2002, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -17,6 +17,7 @@
* David McKnight (IBM) - [189873] DownloadJob changed to DownloadAndOpenJob * David McKnight (IBM) - [189873] DownloadJob changed to DownloadAndOpenJob
* David McKnight (IBM) - [224377] "open with" menu does not have "other" option * David McKnight (IBM) - [224377] "open with" menu does not have "other" option
* David McKnight (IBM) - [276103] Files with names in different cases are not handled properly * David McKnight (IBM) - [276103] Files with names in different cases are not handled properly
* David McKnight (IBM) - [309813] RSE permits opening of file after access removed
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.files.ui.actions; package org.eclipse.rse.internal.files.ui.actions;
@ -151,11 +152,14 @@ public class SystemEditFilesAction extends SystemBaseAction {
boolean usedBinary = properties.getUsedBinaryTransfer(); boolean usedBinary = properties.getUsedBinaryTransfer();
boolean isBinary = remoteFile.isBinary(); boolean isBinary = remoteFile.isBinary();
boolean usedReadOnly = properties.getReadOnly();
boolean isReadOnly = !remoteFile.canWrite();
return (!dirty && return (!dirty &&
!remoteNewer && !remoteNewer &&
usedBinary == isBinary && usedBinary == isBinary &&
usedReadOnly == isReadOnly &&
!encodingChanged); !encodingChanged);
} }
return false; return false;
} }