Add mtime to receiving filename, so that we dont have name clashes with systems that use the same archive name for our host
This commit is contained in:
@@ -102,13 +102,13 @@ class File extends FileBase implements \Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the name of the file, without a node ID prefix
|
||||
* Return the name of the file, without a node ID, mtime prefix
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function rawName(): string
|
||||
{
|
||||
return preg_replace('/^[0-9A-F]{4}-/','',$this->getFilename());
|
||||
return preg_replace('/^[0-9A-F]{4}-([0-9]+)-]/','',$this->getFilename());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -36,7 +36,7 @@ final class Item extends Receive
|
||||
return Storage::disk(config('fido.local_disk'))->exists($this->rel_name);
|
||||
|
||||
case 'pref_name':
|
||||
return sprintf('%04X-%s',$this->ao->id,$this->recvas);
|
||||
return sprintf('%04X-%d-%s',$this->ao->id,$this->recvmtime,$this->recvas);
|
||||
case 'rel_name':
|
||||
return sprintf('%s/%s',config('fido.dir'),$this->pref_name);
|
||||
case 'full_name':
|
||||
|
Reference in New Issue
Block a user