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

Default file location is ignored with auto cleanup #7658

Open
1 task done
funnym0nk3y opened this issue Apr 21, 2021 · 11 comments
Open
1 task done

Default file location is ignored with auto cleanup #7658

funnym0nk3y opened this issue Apr 21, 2021 · 11 comments

Comments

@funnym0nk3y
Copy link

funnym0nk3y commented Apr 21, 2021

JabRef 5.2--2020-12-24--6a2a512
Windows 10 10.0 amd64
Java 14.0.2

When trying to cleanup all the entries the option to move the files into the default location ignores my global settings aswell as the settings for my bib file, where the default location is set. All the files get moved to the folder where the .bib-file lives.

grafik

grafik

grafik

grafik

Maybe that is an issue on my part, which does not require a bug report, but I don't know what could be wrong.

@Melchior-S
Copy link

I am having a similar issue. When trying to move files to the default file location files are copied to the bibfile location even though I have set the default file location. This happens if I use cleanup entries (Alt + F8) or the right click menu option for moving files.

In the cleanup entries menu the bibfile directory path is displayed as the target path for moving files (at least I know where to find them).
image

I have defined my general file directory as a relative path. I thought this might be causing the issues but updating it to a fixed path did not fix the issue.

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

@funnym0nk3y are you also using relative file locations?

@Melchior-S have you tried using the user specific library location? I am not sure how well it works for your setup (I am only using one computer)

I also wanted to make sure that you have disabled the "Search and store files relative to library file location" in "JabRef Preferences" -> "Linked files".

@Melchior-S
Copy link

@k3KAW8Pnf7mkmdSMPHz27 Sorry yes "Search and store files relative to library file location" was enabled. Disabling this feature resolves my issues.

Its a fresh install of V5.3. Not sure if this is a configuration that was bought across from my previous configuration or if it was enabled by default.

@funnym0nk3y
Copy link
Author

@k3KAW8Pnf7mkmdSMPHz27 Yes, I want to use relative locations. Is there an issue with relative locations?

@Melchior-S
Copy link

@funnym0nk3y, just in case this is useful to you. My general file directory for my library is defined as a relative directory "../../Papers" (two directories up and in a folder called papers). With relative locations disabled my documents are still correctly copied to this location when I select clean-up entries or right click move to file location. However, if your files are stored in multiple locations that you would like to be relative to your bib file then this will probably not be useful to you.

@k3KAW8Pnf7mkmdSMPHz27 To test for you I tried using user specific file locations with "Search and store files relative to library file location" enables. The behaviour was the same as for general file directories. Files were copied to the .bib file location.

@Siedlerchr
Copy link
Member

@Melchior-S @funnym0nk3y I am having troubles to understand if this works now for you or not.
To make the process a bit more clear:

JabRef uses the first existing file directory it finds in this order:

  1. Library settings: User specific file directory; Can be relative
  2. Library settings: General file directory; Can be relative
  3. Options → Preferences → Linked files, item Main file directory. This must be an absolute path
  4. Overwrites all other variants if checked: Options -> Preferences -> Linked Files ("search and store files relative to library file location") aka Bib file location

This is exactly what the File Cleanup does at well. It first locates the file at its current (source/old) location and then moves it to the target.

Afterwards, in the cleanup the paths are relativized to the new directory (if the option is checked)

@funnym0nk3y
Copy link
Author

I tried it with the following settings:

  1. .\Dateien
  2. .\Dateien
  3. Pointing to the same directory, but with an absolute path.
  4. Unchecked

Now all the files are not found anymore. When linking them again it seems to work.

@Melchior-S
Copy link

Melchior-S commented May 31, 2021

@Siedlerchr Sorry if my last post was unclear.

As stated in a previous post above if I disable "Search and store files relative to library file location" then files are copied to the file location I specify in the "library settings: General file directory". Based on the directory search order you listed above it seems everything is working as intended.

To me it is just not intuitive that the general Jabref preference "Search and store files relative to library file location" overrides library specific file locations for storing files. I would expect library specific options to take priority over general options. As it seems the issues I was having is not a bug this is probably not the place to address this.

@koppor
Copy link
Member

koppor commented Oct 24, 2021

@Melchior-S Your last comment is IMHO the issue I encountered today: #8179. Could you please try today's development version and see if that fixed your issue, too?

@koppor koppor added the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Oct 24, 2021
@Melchior-S
Copy link

@koppor I have installed todays development version. Since the update cleanup entries or selecting the file path in the entry editor and selecting "Move file to file directory" does not seem to have any affect on the file location. I tested this with "Search and store files relative to library file location" enabled and with it disabled (main file directory enabled).

I get the following response with either selection:

  • If I go (Quality - Clean up entries - Select checkbox "Move linked files to default file directory C:###\Papers" ) I get popup message at the bottom of my screen saying no entries require cleanup. The file currently sits in my downloads folder.
  • Right clicking on the file path in the entry editors table and selecting move to file directory results in no visible change and the file remains in my downloads folder.

I hope this information helps.

@koppor koppor removed the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Oct 25, 2021
@koppor
Copy link
Member

koppor commented Oct 25, 2021

Blocked by #8182. After that issue is resolved, we need to investigatge this again.

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

No branches or pull requests

5 participants