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

Parent folder of uploaded files and folders also gets tagged #92

Open
thrdroom opened this issue Dec 10, 2019 · 7 comments
Open

Parent folder of uploaded files and folders also gets tagged #92

thrdroom opened this issue Dec 10, 2019 · 7 comments

Comments

@thrdroom
Copy link

thrdroom commented Dec 10, 2019

I have the exact same problem as described in #87
The "fix" suggested by @nickvergessen does not really solve the problem!

I need the ability to upload folders which automatically get tagged, as well as the option to exclude the parent folder from beeing automatically tagged. There should be either be an option to exclude the parent folder, or any folder a user wishes. Im not sure how the folders to be exlcuded should be selected/defined.

File MIME type > is not > httpd/unix-directory is not a real fix to this problem as it stopps the ability from folders beeing auto tagged and deleted inside the parent folder.

Steps to reproduce

  1. Set a tag "1dayRetention" to be automatically added to files and folders tagged with "parentfolder"
  2. Create folder "tempdir"
  3. Tag folder "tempdir" with tag "parentfolder"
  4. Upload files and folders into the folder "tempdir"

autodelete-retention

Expected behaviour

All files and folders which are uploaded to the parent directory called "tempdir" should be tagged with the tag "1dayRetention". But the parent directory called "tempdir" should not be tagged with the tag "1dayRetention"

tempdir/ [parentfolder]
├── project1/ [1dayRetention]
│ ├── file1.txt [1dayRetention]
│ ├── file2.txt [1dayRetention]
├── file3.txt [1dayRetention]

Actual behaviour

All files and folders which are uploaded to the parent directory called "tempdir" get tagged with the tag "1dayRetention" including the parent directory called "tempdir" itself. Which results in the deletion of the parent directory.

tempdir/ [parentfolder][1dayRetention]
├── project1/ [1dayRetention]
│ ├── file1.txt [1dayRetention]
│ ├── file2.txt [1dayRetention]
├── file3.txt [1dayRetention]

Server configuration

Operating system:
Debian 10

Web server:
Apache

Database:
MariaDB

PHP version:
7.3.11

Nextcloud version: (see Nextcloud admin page)
17.0.1

@thrdroom thrdroom changed the title Parent folder of uploaded file also gets tagged Parent folder of uploaded files and folders also gets tagged Dec 10, 2019
@Coernel82
Copy link

Bug confirmed using

  • Automated Tagging App 1.7.0

  • Retention 1.6.0

  • NextCloudPi 17.0.2 on RaspberryPi

@nickvergessen
Copy link
Member

Well the main issue is that modifying a file also applies tags. Since the parent folders also get modified (last changed and size) they also get tagged.

@Coernel82
Copy link

It used to be different. @nickvergessen it does absolutely makes sense what you say - undeniable Vulcan logic. So technically this is not a bug but a severe limitation.
I'd be hapy if someone fixes this. I would but I am no programmer. I can offer a free singing lesson in Germany in exchange ;-)

@nickvergessen
Copy link
Member

You wouldn't want to hear me trying to sing.
It's on my head and in my mind, if I find a clever way to achieve it, it will get fixed. I suffered from the same issue on my instance, but i just excluded my folder names as a workaround, but that only works if you know all affectes folders 🙈

@jernejs
Copy link

jernejs commented Apr 28, 2020

I've got the same problem - been using automated tagging with retention plugin to automatically delete files from certain folders, but now the folders themselves get removed as well. Would it be at least possible to add a filter for folders in general?

@Coernel82
Copy link

Coernel82 commented Apr 28, 2020

There is a workaround to exclude folders in general:

when accessing file
and collobarative tag on file is tagged with <yourspecifictag(invisible)>
and file MIME-Type is not user defined MIME-type httpd/unix-directory

then add tag <yourspecificdeletiontag>

The actual english word may differ - i translated from German.

@sachilles
Copy link

I can confirm the bug. Furthermore, the above mentioned workaround does not work for me.

  • Nextcloud 20.0.1 (on x86_64)
  • App: Files automated tagging version 1.10.0
  • App: Retention version 1.8.2

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

No branches or pull requests

5 participants