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

Feature/add exclude hidden file or folder option when create custom media folder type #12323

Conversation

BBBOND
Copy link
Contributor

@BBBOND BBBOND commented Dec 22, 2023

  • Tests written, or not not needed

Adding a synchronization directory of custom file types will synchronize all files to the cloud. However, many useless hidden files are often written into the directory by third-party software, causing conflicts in synchronization. Therefore, an option to exclude hidden files has been added. to solve this problem.

image

@BBBOND
Copy link
Contributor Author

BBBOND commented Dec 22, 2023

@AndyScherzinger Hello, here is new

@joshtrichards
Copy link
Member

Related: #3418 & #3500

@BBBOND BBBOND force-pushed the feature/add-exclude-hidden-file-or-folder-option-when-create-custom-media-folder branch 3 times, most recently from a9e6afe to cdf6f42 Compare December 29, 2023 01:55
@alperozturk96 alperozturk96 force-pushed the feature/add-exclude-hidden-file-or-folder-option-when-create-custom-media-folder branch from cdf6f42 to 41da487 Compare December 29, 2023 14:10
@alperozturk96 alperozturk96 force-pushed the feature/add-exclude-hidden-file-or-folder-option-when-create-custom-media-folder branch from 41da487 to cce4290 Compare January 9, 2024 13:27
@BBBOND BBBOND force-pushed the feature/add-exclude-hidden-file-or-folder-option-when-create-custom-media-folder branch 3 times, most recently from db24d26 to 3b3e6a4 Compare January 15, 2024 13:27
Copy link
Member

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except a minor wording nitpick a general question I can’t tell from the code:
Is this on by default?

And @tobiasKaminsky @AndyScherzinger would this be something we want to have on by default? (I assume no and everything should be synced, but you are more knowledgeable about specifics.)

app/src/main/res/values/strings.xml Outdated Show resolved Hide resolved
@AndyScherzinger
Copy link
Member

I would say offby default too, yes

@AndyScherzinger
Copy link
Member

@BBBOND you might want to use git fetch and rebase to pull in latest changes from our master branch so the changeset in this PR only shows the things you actually changed and not merged commits from master branch.

@BBBOND
Copy link
Contributor Author

BBBOND commented Jan 31, 2024

Hello @AndyScherzinger, How long will it take to review this code? The rebase code will always produce some conflicts. For example, we have all changed the database structure, lead to the generated json files in the com.nextcloud.client.database.NextcloudDatabase directory has changed.

@BBBOND BBBOND force-pushed the feature/add-exclude-hidden-file-or-folder-option-when-create-custom-media-folder branch from e7312c1 to 4bf5718 Compare January 31, 2024 14:57
@BBBOND
Copy link
Contributor Author

BBBOND commented Jan 31, 2024

@AndyScherzinger I have rebased it.

@BBBOND BBBOND force-pushed the feature/add-exclude-hidden-file-or-folder-option-when-create-custom-media-folder branch from 4bf5718 to 3e32b16 Compare February 3, 2024 10:25
@AndyScherzinger
Copy link
Member

Should have happened for a while. Sorry about this 😔

@JonasMayerDev @tobiasKaminsky @alperozturk96 @ZetaTom please review and merge!

@alperozturk96 alperozturk96 force-pushed the feature/add-exclude-hidden-file-or-folder-option-when-create-custom-media-folder branch from 3e32b16 to 83004a1 Compare February 5, 2024 08:47
@alperozturk96
Copy link
Collaborator

@BBBOND Hey. Could you sign off your commits?

Copy link
Collaborator

@alperozturk96 alperozturk96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Crashed on Android 14 emulator.

Logcat file

Android-14-Android-14_2024-02-05_095459.logcat.zip

Log 2024-02-05 09:50:46.589 11679-11679 SQLiteLog com.nextcloud.client E (1) duplicate column name: end_to_end_encryption_api_version in "ALTER TABLE `capabilities` ADD COLUMN `end_to_end_encryption_api_version` TEXT DEFAULT NULL" 2024-02-05 09:50:46.590 11679-11679 AndroidRuntime com.nextcloud.client D Shutting down VM 2024-02-05 09:50:46.591 11679-11679 AndroidRuntime com.nextcloud.client E FATAL EXCEPTION: main Process: com.nextcloud.client, PID: 11679 java.lang.RuntimeException: Unable to create application com.owncloud.android.MainApp: android.database.sqlite.SQLiteException: duplicate column name: end_to_end_encryption_api_version (code 1 SQLITE_ERROR): , while compiling: ALTER TABLE `capabilities` ADD COLUMN `end_to_end_encryption_api_version` TEXT DEFAULT NULL at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7003) at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2236) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.app.ActivityThread.main(ActivityThread.java:8177) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) Caused by: android.database.sqlite.SQLiteException: duplicate column name: end_to_end_encryption_api_version (code 1 SQLITE_ERROR): , while compiling: ALTER TABLE `capabilities` ADD COLUMN `end_to_end_encryption_api_version` TEXT DEFAULT NULL at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method) at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1069) at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:673) at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:590) at android.database.sqlite.SQLiteProgram.(SQLiteProgram.java:62) at android.database.sqlite.SQLiteStatement.(SQLiteStatement.java:34) at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:2088) at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:2010) at androidx.sqlite.db.framework.FrameworkSQLiteDatabase.execSQL(FrameworkSQLiteDatabase.kt:246) at com.nextcloud.client.database.NextcloudDatabase_AutoMigration_77_78_Impl.migrate(NextcloudDatabase_AutoMigration_77_78_Impl.java:19) at androidx.room.RoomOpenHelper.onUpgrade(RoomOpenHelper.kt:90) at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.onUpgrade(FrameworkSQLiteOpenHelper.kt:253) at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:416) at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:340) at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableOrReadableDatabase(FrameworkSQLiteOpenHelper.kt:234) at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.innerGetDatabase(FrameworkSQLiteOpenHelper.kt:190) at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getSupportDatabase(FrameworkSQLiteOpenHelper.kt:151) at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getReadableDatabase(FrameworkSQLiteOpenHelper.kt:107) at com.owncloud.android.providers.FileContentProvider.query(FileContentProvider.java:468) at android.content.ContentProvider.query(ContentProvider.java:1596) at android.content.ContentProvider.query(ContentProvider.java:1692) at android.content.ContentProvider$Transport.query(ContentProvider.java:292) at android.content.ContentResolver.query(ContentResolver.java:1229) at android.content.ContentResolver.query(ContentResolver.java:1161) at android.content.ContentResolver.query(ContentResolver.java:1117) at com.owncloud.android.datamodel.FileDataStorageManager.getCapabilityCursorForAccount(FileDataStorageManager.java:2031) at com.owncloud.android.datamodel.FileDataStorageManager.getCapability(FileDataStorageManager.java:2058) at com.owncloud.android.utils.theme.CapabilityUtils.getCapability(CapabilityUtils.java:84) at com.owncloud.android.utils.theme.MaterialSchemesProviderImpl.getMaterialSchemesForUser(MaterialSchemesProviderImpl.kt:50) 2024-02-05 09:50:46.593 11679-11679 AndroidRuntime com.nextcloud.client E at com.owncloud.android.utils.theme.MaterialSchemesProviderImpl.getMaterialSchemesForCurrentUser(MaterialSchemesProviderImpl.kt:68) at com.nextcloud.client.di.ThemeModule$Companion.provideMaterialSchemes(ThemeModule.kt:55) at com.nextcloud.client.di.ThemeModule_Companion_ProvideMaterialSchemesFactory.provideMaterialSchemes(ThemeModule_Companion_ProvideMaterialSchemesFactory.java:46) at com.nextcloud.client.di.ThemeModule_Companion_ProvideMaterialSchemesFactory.get(ThemeModule_Companion_ProvideMaterialSchemesFactory.java:36) at com.nextcloud.client.di.ThemeModule_Companion_ProvideMaterialSchemesFactory.get(ThemeModule_Companion_ProvideMaterialSchemesFactory.java:13) at com.owncloud.android.utils.theme.ViewThemeUtils_Factory.get(ViewThemeUtils_Factory.java:38) at com.owncloud.android.utils.theme.ViewThemeUtils_Factory.get(ViewThemeUtils_Factory.java:12) at com.owncloud.android.MainApp.onCreate(MainApp.java:294) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1316) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6998) ... 9 more

@BBBOND BBBOND force-pushed the feature/add-exclude-hidden-file-or-folder-option-when-create-custom-media-folder branch from 8d09f50 to 3508b9c Compare February 10, 2024 08:20
@AndyScherzinger AndyScherzinger force-pushed the feature/add-exclude-hidden-file-or-folder-option-when-create-custom-media-folder branch 2 times, most recently from 7d70541 to 7a95e9c Compare February 11, 2024 13:40
@AndyScherzinger
Copy link
Member

❗ REBASED ❗

@AndyScherzinger AndyScherzinger force-pushed the feature/add-exclude-hidden-file-or-folder-option-when-create-custom-media-folder branch 6 times, most recently from de8055f to f20a0bf Compare February 12, 2024 22:41
@AndyScherzinger AndyScherzinger force-pushed the feature/add-exclude-hidden-file-or-folder-option-when-create-custom-media-folder branch from f20a0bf to 0bdf85c Compare February 13, 2024 07:40
@AndyScherzinger AndyScherzinger merged commit bc0c9cf into nextcloud:master Feb 13, 2024
19 checks passed
@AndyScherzinger
Copy link
Member

Thanks for the contribution @BBBOND 🎉

Happy to have it in 💯

Just sent you an invite for the Github organization so you can work on branches within the repository and won't have to work on a fork. This should make your life easier in the future for contributions.

Copy link

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants