Skip to content

Commit 724d68d

Browse files
committed
Added filter to move or copy action to remove files and encrypted folders
1 parent 219c508 commit 724d68d

File tree

6 files changed

+11
-28
lines changed

6 files changed

+11
-28
lines changed

apps/files/src/actions/moveOrCopyAction.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,11 @@ async function openFilePickerForAction(
230230
// We don't want to show the current nodes in the file picker
231231
return !fileIDs.includes(n.fileid)
232232
})
233+
.setFilter((n: Node) => {
234+
// We only want to show folders in the file picker
235+
// We don't want to show encrypted folders in the file picker
236+
return !(n.attributes?.['type'] !== "directory" || n.attributes?.['is-encrypted'] === 1)
237+
})
233238
.setMimeTypeFilter([])
234239
.setMultiSelect(false)
235240
.startAt(dir)

dist/files-init.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files-init.js.LICENSE.txt

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,28 +47,6 @@
4747
*
4848
*/
4949

50-
/**
51-
* @copyright Copyright (c) 2024 Eduardo Morales <emoral435@gmail.com>
52-
*
53-
* @author Eduardo Morales <emoral435@gmail.com>
54-
*
55-
* @license AGPL-3.0-or-later
56-
*
57-
* This program is free software: you can redistribute it and/or modify
58-
* it under the terms of the GNU Affero General Public License as
59-
* published by the Free Software Foundation, either version 3 of the
60-
* License, or (at your option) any later version.
61-
*
62-
* This program is distributed in the hope that it will be useful,
63-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
64-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
65-
* GNU Affero General Public License for more details.
66-
*
67-
* You should have received a copy of the GNU Affero General Public License
68-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
69-
*
70-
*/
71-
7250
/**
7351
* @copyright Copyright (c) 2024 Ferdinand Thiessen <opensource@fthiessen.de>
7452
*

dist/files-init.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)