mirror of
https://gitee.com/openharmony/filemanagement_user_file_service
synced 2024-11-30 02:50:35 +00:00
Merge branch 'master' of gitee.com:Zshengyu26/filemanagement_user_file_service
This commit is contained in:
commit
e0a8da397e
@ -23,8 +23,8 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace FileAccessFwk {
|
||||
const int64_t FILEFILTER_DEFAULT_COUNTS = 2000;
|
||||
const int64_t FILEFILTER_MAX_COUNTS = 20000;
|
||||
const uint64_t FILEFILTER_DEFAULT_COUNTS = 2000;
|
||||
const uint64_t FILEFILTER_MAX_COUNTS = 20000;
|
||||
std::shared_ptr<FileAccessExtAbility> FileAccessExtStubImpl::GetOwner()
|
||||
{
|
||||
return extension_;
|
||||
@ -149,7 +149,7 @@ int FileAccessExtStubImpl::ListFile(const FileInfo &fileInfo, const int64_t offs
|
||||
memInfo.isOver = false;
|
||||
int64_t currentOffset = offset;
|
||||
while (true) {
|
||||
int64_t maxCounts =
|
||||
uint64_t maxCounts =
|
||||
memInfo.memSize > DEFAULT_CAPACITY_200KB ? FILEFILTER_MAX_COUNTS : FILEFILTER_DEFAULT_COUNTS;
|
||||
fileInfoVec.clear();
|
||||
ret = extension_->ListFile(fileInfo, currentOffset, maxCounts, filter, fileInfoVec);
|
||||
|
@ -211,7 +211,7 @@ public:
|
||||
|
||||
static bool CalculateMemSize(uint64_t &memSize, SharedMemoryInfo &memInfo)
|
||||
{
|
||||
uint64_t allocSize = ((memInfo.leftDataCounts + memInfo.totalDataCounts - 1) / memInfo.totalDataCounts + 1)
|
||||
int64_t allocSize = ((memInfo.leftDataCounts + memInfo.totalDataCounts - 1) / memInfo.totalDataCounts + 1)
|
||||
* DEFAULT_CAPACITY_200KB;
|
||||
|
||||
if (allocSize >= MAX_CAPACITY_2MB && memInfo.memSize < MAX_CAPACITY_2MB) {
|
||||
|
Loading…
Reference in New Issue
Block a user