# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
--- D:\develop\archives\qtjambi-src-lgpl-4.5.2_01\com\trolltech\qt\internal\NativeLibraryManager.java
+++ D:\develop\archives\qtjambi-win32-lgpl-4.5.2_01\src\com\trolltech\qt\internal\NativeLibraryManager.java
@@ -529,22 +529,28 @@
 
         reporter.report(" - using cache directory: '", tmpDir.getAbsolutePath(), "'");
 
-        boolean shouldCopy = false;
+        boolean copyOver = false;
 
         // If the dir exists and contains .dummy, sanity check the contents...
         File dummyFile = new File(tmpDir, ".dummy");
         if (dummyFile.exists()) {
             reporter.report(" - cache directory exists");
         } else {
-            shouldCopy = true;
+            copyOver = true;
         }
 
-        // If the dir doesn't exists or it was only half completed, copy the files over...
-        if (shouldCopy) {
             reporter.report(" - starting to copy content to cache directory...");
 
             for (LibraryEntry e : spec.libraries) {
+
+            // if file does not exists or copyOver flag is set - copy:
+            File outFile = new File(tmpDir, e.name);
+            boolean exists = outFile.exists();
+            if (!exists || copyOver) {
+                if (copyOver) {
                 reporter.report(" - copying over: '", e.name, "'...");
+                }
+
                 InputStream in = null;
 
                 Enumeration<URL> resources = classLoader().getResources(e.name);
@@ -565,7 +571,6 @@
                                                     + jarName + "' does not exist");
                 }
 
-                File outFile = new File(tmpDir, e.name);
                 File outFileDir = outFile.getParentFile();
                 if (!outFileDir.exists()) {
                     reporter.report(" - creating directory: ", outFileDir.getAbsolutePath());
@@ -575,12 +580,10 @@
                 OutputStream out = new FileOutputStream(new File(tmpDir, e.name));
                 copy(in, out);
             }
-
-            if (!dummyFile.createNewFile()) {
-                throw new DeploymentSpecException("Can't create dummy file in cache directory");
             }
-        }
 
+        dummyFile.createNewFile();
+
         // Load the libraries tagged for loading...
         Runtime rt = Runtime.getRuntime();
         for (LibraryEntry e : spec.libraries) {
