Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix/fp-offline-browsing] Allow offline browsing of folders in the File Provider #547

Merged
merged 5 commits into from
Oct 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions external/libzip/libzip.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = DCE93FD921FCA42B000E14F2;
productRefGroup = DCE93FE421FCA42C000E14F2 /* Products */;
Expand Down
5 changes: 5 additions & 0 deletions ownCloud File Provider/FileProviderExtension.m
Original file line number Diff line number Diff line change
Expand Up @@ -896,3 +896,8 @@ - (void)core:(OCCore *)core handleError:(NSError *)error issue:(OCIssue *)issue
@end

OCClaimExplicitIdentifier OCClaimExplicitIdentifierFileProvider = @"fileProvider";

/*
Additional information:
- NSExtensionFileProviderSupportsPickingFolders: https://twitter.com/palmin/status/1177860144258076673
*/
8 changes: 8 additions & 0 deletions ownCloud File Provider/OCItem+FileProviderItem.m
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ - (BOOL)isDownloaded
return (YES);
}

if (self.type == OCItemTypeCollection)
{
// Needs to return YES for folders in order to allow browsing while offline
// Otherwise Files.app will bring up an alert "You're not connected to the Internet"
// (big thanks to @palmin who pointed me to this possibility)
return (YES);
}

return (NO);
}

Expand Down