summaryrefslogtreecommitdiff
path: root/includes/file.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/file.inc')
-rw-r--r--includes/file.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/file.inc b/includes/file.inc
index 7d23d4a7c..71ec3c06b 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -28,7 +28,7 @@ define('FILE_EXISTS_ERROR', 2);
*/
function file_create_url($path) {
// Strip file_directory_path from $path. We only include relative paths in urls.
- if (strpos($path, file_directory_path()) !== false) {
+ if (strpos($path, file_directory_path() . '/') === 0) {
$path = trim(substr($path, strlen(file_directory_path())), '\\/');
}
switch (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC)) {