|
|
|
@ -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<T extends BaseBook, U extends BaseUndoState<?>>
|
|
|
|
|
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(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|