Commit baeda7dd0fbd00845518993e471e45df377a3e91
1 parent
6a8171af
BBS-1098
"Mac Goliath as third-party client" Fixed. Fixed the rename function to ignore ._filename resource forks. Committed by: Megan Watson Reviewed by: Conrad Vermeulen git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7607 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
25 additions
and
0 deletions
ktwebdav/lib/KTWebDAVServer.inc.php
| ... | ... | @@ -1678,7 +1678,32 @@ class KTWebDAVServer extends HTTP_WebDAV_Server |
| 1678 | 1678 | return "502 bad gateway - No moving to different WebDAV Servers yet"; |
| 1679 | 1679 | } |
| 1680 | 1680 | */ |
| 1681 | + | |
| 1681 | 1682 | $source_path = $options["path"]; |
| 1683 | + | |
| 1684 | + // Fix for Mac Goliath | |
| 1685 | + // Modified - 30/10/07 | |
| 1686 | + // Mac adds ._filename files when files are added / copied / moved | |
| 1687 | + // we want to ignore them. | |
| 1688 | + if($this->dav_client == 'MG'){ | |
| 1689 | + // Remove filename from path | |
| 1690 | + $aPath = explode('/', $source_path); | |
| 1691 | + $fileName = $aPath[count($aPath)-1]; | |
| 1692 | + | |
| 1693 | +// if(strtolower($fileName) == '.ds_store'){ | |
| 1694 | +// $this->ktwebdavLog("Using a mac client. Ignore the .DS_Store files created with every folder.", 'info', true); | |
| 1695 | +// // ignore | |
| 1696 | +// return "204 No Content"; | |
| 1697 | +// } | |
| 1698 | + | |
| 1699 | + if($fileName[0] == '.' && $fileName[1] == '_'){ | |
| 1700 | + $fileName = substr($fileName, 2); | |
| 1701 | + $this->ktwebdavLog("Using a mac client. Ignore the ._filename files created with every file.", 'info', true); | |
| 1702 | + // ignore | |
| 1703 | + return "204 No Content"; | |
| 1704 | + } | |
| 1705 | + } | |
| 1706 | + | |
| 1682 | 1707 | $source_res = $this->_folderOrDocument($source_path); |
| 1683 | 1708 | if ($source_res === false) { |
| 1684 | 1709 | $this->ktwebdavLog("404 Not found - Document was not found.", 'info', true); | ... | ... |