Skip to content

Commit

Permalink
Added filter to move or copy action to remove files and encrypted fol…
Browse files Browse the repository at this point in the history
…ders
  • Loading branch information
memurats committed Nov 12, 2024
1 parent 219c508 commit 724d68d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 28 deletions.
5 changes: 5 additions & 0 deletions apps/files/src/actions/moveOrCopyAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ async function openFilePickerForAction(
// We don't want to show the current nodes in the file picker
return !fileIDs.includes(n.fileid)
})
.setFilter((n: Node) => {
// We only want to show folders in the file picker
// We don't want to show encrypted folders in the file picker
return !(n.attributes?.['type'] !== "directory" || n.attributes?.['is-encrypted'] === 1)
})
.setMimeTypeFilter([])
.setMultiSelect(false)
.startAt(dir)
Expand Down
4 changes: 2 additions & 2 deletions dist/files-init.js

Large diffs are not rendered by default.

22 changes: 0 additions & 22 deletions dist/files-init.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,6 @@
*
*/

/**
* @copyright Copyright (c) 2024 Eduardo Morales <emoral435@gmail.com>
*
* @author Eduardo Morales <emoral435@gmail.com>
*
* @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

/**
* @copyright Copyright (c) 2024 Ferdinand Thiessen <opensource@fthiessen.de>
*
Expand Down
2 changes: 1 addition & 1 deletion dist/files-init.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

0 comments on commit 724d68d

Please sign in to comment.