diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-11-12 10:24:10 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-11-12 10:24:10 +0100 |
commit | 9f10f15fd459234c160fb3e41eab623607e52e72 (patch) | |
tree | 165dbb0c6c25178b29006d8b7ab2701e710c7f81 /apps/files_encryption/lib/helper.php | |
parent | 802213f7ecf925ff3f63c2198dde4d63fce16846 (diff) | |
download | nextcloud-server-9f10f15fd459234c160fb3e41eab623607e52e72.tar.gz nextcloud-server-9f10f15fd459234c160fb3e41eab623607e52e72.zip |
fixing tests for the new part file handling
Diffstat (limited to 'apps/files_encryption/lib/helper.php')
-rwxr-xr-x | apps/files_encryption/lib/helper.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php index 98a5f1f2f28..48175e460ec 100755 --- a/apps/files_encryption/lib/helper.php +++ b/apps/files_encryption/lib/helper.php @@ -156,6 +156,22 @@ class Helper { return $return; } + /** + * @brief Check if a path is a .part file + * @param string $path Path that may identify a .part file + * @return bool + */ + public static function isPartialFilePath($path) { + + $extension = pathinfo($path, PATHINFO_EXTENSION); + if ( $extension === 'part' || $extension === 'etmp') { + return true; + } else { + return false; + } + + } + /** * @brief Remove .path extension from a file path |