From 673b2dababf9d5cd3bef83bc372f1a06540d39fa Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 7 Apr 2022 17:56:16 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-69289=20=E3=80=90=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E3=80=91=E5=A4=A7=E5=B1=8F=E7=BC=96=E8=BE=91=E5=99=A8?= =?UTF-8?q?-=E7=B9=81=E4=BD=93=E8=AE=BE=E8=AE=A1=E5=99=A8-=E8=BF=9C?= =?UTF-8?q?=E7=A8=8B=E6=9C=8D=E5=8A=A1=E5=99=A8=EF=BC=8C=E6=89=93=E5=BC=80?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E4=B8=8B=E7=9A=84=E6=A8=A1=E6=9D=BF=EF=BC=8C?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=88=91=E5=A4=87=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/JTemplate.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 6c9406a8b..aacbd2fbf 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -65,6 +65,7 @@ import com.fr.design.write.submit.DBManipulationPane; import com.fr.event.EventDispatcher; import com.fr.file.FILE; import com.fr.file.FILEChooserPane; +import com.fr.file.FileFILE; import com.fr.file.MemFILE; import com.fr.file.StashedFILE; import com.fr.form.ui.NoneWidget; @@ -1010,8 +1011,11 @@ public abstract class JTemplate> if (WorkContext.getCurrent().get(LockInfoOperator.class).isTplUnLocked(getEditingFILE().getPath())) { throw new UnLockedException(); } - // 校验锁定信息是否一致 - if (getEditingFILE().exists() && !WorkContext.getCurrent().get(LockInfoOperator.class).isConsistentLock(getEditingFILE().getPath())) { + // 过滤掉本地文件 + boolean localFile = getEditingFILE() instanceof FileFILE; + boolean inconsistent = !localFile && getEditingFILE().exists() + && !WorkContext.getCurrent().get(LockInfoOperator.class).isConsistentLock(getEditingFILE().getPath()); + if (inconsistent) { throw new InconsistentLockException(); } }