mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-03-03 13:29:56 +00:00
Fixed problem where the compiler sometimes deletes a resource file when called. Closes #775
This commit is contained in:
parent
13a7063df0
commit
95aa5ec6c4
@ -420,7 +420,7 @@ public class KickC implements Callable<Integer> {
|
|||||||
if(Files.exists(outResourcePath)) {
|
if(Files.exists(outResourcePath)) {
|
||||||
FileTime resModified = Files.getLastModifiedTime(resourcePath);
|
FileTime resModified = Files.getLastModifiedTime(resourcePath);
|
||||||
FileTime outModified = Files.getLastModifiedTime(outResourcePath);
|
FileTime outModified = Files.getLastModifiedTime(outResourcePath);
|
||||||
if(outModified.toMillis() > resModified.toMillis()) {
|
if(outModified.toMillis() >= resModified.toMillis()) {
|
||||||
// Outfile is newer - move on to next file
|
// Outfile is newer - move on to next file
|
||||||
System.out.println("Resource already copied " + outResourcePath);
|
System.out.println("Resource already copied " + outResourcePath);
|
||||||
continue;
|
continue;
|
||||||
|
@ -276,8 +276,8 @@ public class OutputFileManager {
|
|||||||
* @return true if the resources should be copied
|
* @return true if the resources should be copied
|
||||||
*/
|
*/
|
||||||
public boolean shouldCopyResources() {
|
public boolean shouldCopyResources() {
|
||||||
final Path cFileDirectory = primaryCFile.toAbsolutePath().getParent();
|
final Path cFileDirectory = primaryCFile.toAbsolutePath().getParent().normalize();
|
||||||
final Path outputDirectory = getOutputDirectory().toAbsolutePath();
|
final Path outputDirectory = getOutputDirectory().toAbsolutePath().normalize();
|
||||||
return !cFileDirectory.equals(outputDirectory);
|
return !cFileDirectory.equals(outputDirectory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user