summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it_auto_prepend.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/it_auto_prepend.php b/it_auto_prepend.php
index 0867357..ace84b1 100644
--- a/it_auto_prepend.php
+++ b/it_auto_prepend.php
@@ -160,7 +160,8 @@ function it_convert($source)
if (!$changed) # Link to original file if no changes made
{
@unlink($converted);
- symlink(realpath($source), $converted);
+ $symlink = function_exists("symlink") ? "symlink" : "copy"; # symlink() does not exist on Windows
+ $symlink(realpath($source), $converted);
}
clearstatcache();