use uuid in file storage
This commit is contained in:
parent
8e71324514
commit
9a8d1200ec
@ -224,7 +224,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo
|
|||||||
}
|
}
|
||||||
|
|
||||||
$filesize = 0;
|
$filesize = 0;
|
||||||
$hash = random_string();
|
$hash = new_uuid();
|
||||||
|
|
||||||
$f = 'store/' . $this->auth->owner_nick . '/' . (($this->os_path) ? $this->os_path . '/' : '') . $hash;
|
$f = 'store/' . $this->auth->owner_nick . '/' . (($this->os_path) ? $this->os_path . '/' : '') . $hash;
|
||||||
|
|
||||||
|
@ -739,7 +739,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(! $hash)
|
if(! $hash)
|
||||||
$hash = random_string();
|
$hash = new_uuid();
|
||||||
|
|
||||||
// Check storage limits
|
// Check storage limits
|
||||||
if($options !== 'update') {
|
if($options !== 'update') {
|
||||||
@ -1122,7 +1122,7 @@ function attach_mkdir($channel, $observer_hash, $arr = null) {
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
$arr['hash'] = (($arr['hash']) ? $arr['hash'] : random_string());
|
$arr['hash'] = (($arr['hash']) ? $arr['hash'] : new_uuid());
|
||||||
|
|
||||||
// Check for duplicate name.
|
// Check for duplicate name.
|
||||||
// Check both the filename and the hash as we will be making use of both.
|
// Check both the filename and the hash as we will be making use of both.
|
||||||
|
Reference in New Issue
Block a user