File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
apps/dav/lib/Connector/Sabre Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -382,14 +382,9 @@ private function getPartFileBasePath($path) {
382382 $ filename = basename ($ path );
383383 // length in bytes NOT characters
384384 $ filenameLength = strlen ($ filename );
385- // check if filename (with transfer id and part extension) overflows the filesystem limit of 255 BYTES
386- // 255 - strlen('.ocTransferId') - strlen('.part') - strlen((string)getrandmax())
387- if ($ filenameLength >= 225 ) {
388- // hash does not need to be secure but fast and semi unique
389- $ filename = hash ('xxh128 ' , $ filename );
390- return substr ($ path , 0 , strlen ($ path ) - $ filenameLength ) . $ filename ;
391- }
392- return $ path ;
385+ // hash does not need to be secure but fast and semi unique
386+ $ filename = hash ('xxh128 ' , $ filename );
387+ return substr ($ path , 0 , strlen ($ path ) - $ filenameLength ) . $ filename ;
393388 } else {
394389 // will place the .part file in the users root directory
395390 // therefor we need to make the name (semi) unique - hash does not need to be secure but fast.
You can’t perform that action at this time.
0 commit comments