I thought that I would post this in case it helps out anyone else.
Due to how our load-balanced webservers keep their data in-sync, I need to use a windows network path as my baseDir and thumbnail baseDir.
I'm using the ColdFusion version, so I entered my network path in the config.cfm file as follows.
config.baseDir = "\\myservername\path\to\folder"; ... ... config.thumbnails.baseDir = "\\myservername\path\to\thumbnail\folder"; ... ... config.tempDirectory = "c:\mytempfolder\";
The thumbnails failed to load, and by capturing the HTTP traffic I saw error returned similar to this returned:
<?xml version="1.0" encoding="UTF-8"?> <Connector><Error number="1" text="An exception occurred when performing a file operation moving a file to another filesystem on files c:\mytempfolder\15B12795-BDB9-505C-18A67D1A63AFCB27.jpg and //myservername/path/to/thumbnail/folder/thumbnails/Images/myimagename.jpg."/></Connector>
Something reversed all of the backslashes in my baseDir path. Not an issue in the directory and file portion, but I needed the double backslash in front of the computer name to not be reversed.
So I tracked this down to the getThumbsServerPath() function in this file /ckfinder/core/connector/cfm/Core/FolderHandler.cfc and made a modification starting at line 193. Here's my code.
if(structkeyexists(REQUEST.config.thumbnails, "baseDir") and Len(REQUEST.config.thumbnails.baseDir)) { /* Modification made to not reverse double backslashes in network paths */ THIS.thumbServerPath = rereplace(REQUEST.config.thumbnails.baseDir,"(?!\\)\\(?!\\)","/","all"); /* Original Code by FredCK THIS.thumbServerPath = replace(REQUEST.config.thumbnails.baseDir,"\","/","all"); */ }
All I did was change a single line, using a regex based replace function instead of the standard replace function. The regEx used only matches single backslashes. Originally I was using (?<!\\)\\(?!\\) as the RegEx, but coldfusion didn't like the (?<!\\) negative lookbehind syntax. I changed it to (?!\\) and it worked fine, so I kept that.