File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
services/src/main/java/org/jd/gui/model/container Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -146,26 +146,27 @@ protected Collection<Container.Entry> loadChildrenFromDirectoryEntry() throws IO
146146 }
147147
148148 protected Collection <Container .Entry > loadChildrenFromFileEntry () throws IOException {
149- File tmpFile = File .createTempFile ("jd-gui." , ".tmp. " + fsPath .getFileName ().toString ());
149+ File tmpFile = File .createTempFile ("jd-gui." , "." + fsPath .getFileName ().toString ());
150150 Path tmpPath = Paths .get (tmpFile .toURI ());
151151
152+ tmpFile .delete ();
152153 Files .copy (fsPath , tmpPath );
154+ tmpFile .deleteOnExit ();
153155
154156 FileSystem subFileSystem = FileSystems .newFileSystem (tmpPath , null );
155157
156158 if (subFileSystem != null ) {
157159 Iterator <Path > rootDirectories = subFileSystem .getRootDirectories ().iterator ();
158160
159161 if (rootDirectories .hasNext ()) {
160- tmpFile .deleteOnExit ();
161-
162162 Path rootPath = rootDirectories .next ();
163163 ContainerFactory containerFactory = api .getContainerFactory (rootPath );
164164
165165 if (containerFactory != null ) {
166166 Container container = containerFactory .make (api , this , rootPath );
167167
168168 if (container != null ) {
169+ tmpFile .delete ();
169170 return container .getRoot ().getChildren ();
170171 }
171172 }
You can’t perform that action at this time.
0 commit comments