Browse Source

[java] close files in File.copy

Andy Li 9 years ago
parent
commit
3eb65b0988
1 changed files with 2 additions and 0 deletions
  1. 2 0
      std/java/_std/sys/io/File.hx

+ 2 - 0
std/java/_std/sys/io/File.hx

@@ -112,6 +112,8 @@ class File {
 			r = read(srcPath);
 			r = read(srcPath);
 			w = write(dstPath);
 			w = write(dstPath);
 			w.writeInput(r);
 			w.writeInput(r);
+			r.close();
+			w.close();
 		}
 		}
 
 
 		catch (e:Dynamic)
 		catch (e:Dynamic)