mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: improve detection of seed file in iCloudDriver
This commit is contained in:
parent
e8a19a4569
commit
a2e5b0eb2b
1 changed files with 9 additions and 6 deletions
|
|
@ -320,13 +320,16 @@ begin
|
|||
end;
|
||||
|
||||
class function TiCloudDriverFileSource.isSeedFile(aFile: TFile): Boolean;
|
||||
var
|
||||
url: NSURL;
|
||||
status: NSString;
|
||||
begin
|
||||
Result:= False;
|
||||
if NOT aFile.Name.StartsWith( '.' ) then
|
||||
Exit;
|
||||
if NOT aFile.Name.EndsWith( '.icloud', True ) then
|
||||
Exit;
|
||||
Result:= True;
|
||||
if aFile.Name = '..' then
|
||||
Exit( False );
|
||||
|
||||
url:= NSURL.fileURLWithPath( StrToNSString(aFile.FullPath) );
|
||||
url.getResourceValue_forKey_error( @status, NSURLUbiquitousItemDownloadingStatusKey, nil );
|
||||
Result:= status.isEqualToString( NSURLUbiquitousItemDownloadingStatusNotDownloaded );
|
||||
end;
|
||||
|
||||
class function TiCloudDriverFileSource.isSeedFiles(aFiles: TFiles): Boolean;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue