summaryrefslogtreecommitdiff
path: root/it_auto_prepend.php
diff options
context:
space:
mode:
authorChristian Schneider2008-03-24 13:47:25 +0000
committerChristian Schneider2008-03-24 13:47:25 +0000
commit1ffc1f70175a88f176898fd476447e7a15c1aabc (patch)
treefda3a46f319f6af7ca0f0902c704d782807cc8a3 /it_auto_prepend.php
parenta7c6487c4f8d982e8d18358d8de55a122e95a74c (diff)
downloaditools-1ffc1f70175a88f176898fd476447e7a15c1aabc.tar.gz
itools-1ffc1f70175a88f176898fd476447e7a15c1aabc.tar.bz2
itools-1ffc1f70175a88f176898fd476447e7a15c1aabc.zip
Use copy() for Windows where symlink() does not exist
Diffstat (limited to 'it_auto_prepend.php')
-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();