Browse Source

Merge pull request #456 in DESIGN/design from ~RINOUX/design:feature/10.0 to feature/10.0

* commit '381b5d9eed96c0df545b90341c13b7df028b6e6b':
  update
  无JIRA任务 向不存在的模版路径写入时不需要先新建空文件,否则其它存储实现会导致重命名失败
research/10.0
rinoux 6 years ago
parent
commit
0cfb6ad541
  1. 1
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  2. 3
      designer-base/src/main/java/com/fr/file/FileFILE.java

1
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -591,7 +591,6 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
return false;
}
editingFILE = fileChooser.getSelectedFILE();
mkNewFile(editingFILE);
}
return saveNewFile(editingFILE, oldName);

3
designer-base/src/main/java/com/fr/file/FileFILE.java

@ -194,11 +194,12 @@ public class FileFILE implements FILE {
* @return 输出流
*/
public OutputStream asOutputStream() {
if (file == null || !file.exists()) {
if (file == null) {
return null;
}
OutputStream out;
try {
StableUtils.makesureFileExist(file);
out = new FileOutputStream(file);
} catch (Exception e) {
throw SessionLocalManager.createLogPackedException(e);

Loading…
Cancel
Save