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

Rename File Fails Silently #3172

Closed
LinusDietz opened this issue Aug 31, 2017 · 5 comments
Closed

Rename File Fails Silently #3172

LinusDietz opened this issue Aug 31, 2017 · 5 comments

Comments

@LinusDietz
Copy link
Member

Renaming a linked file fails if there already exists a file with the name.

In the General tab of the Entry Editor: Right click on the linked file -> Rename File. A popup that states the new file name appears. Confirming it results in a failure without any message. The other file is not overwritten and the operation apparently has no effect.

I would expect that a popup message appears and asks to user to confirm the overwrite.

JabRef 4.0-dev
Mac OS X 10.12.6 x86_64
Java 1.8.0_144

@Siedlerchr
Copy link
Member

Have a look at

public class LinkedFileViewModel extends AbstractViewModel {

 public void rename() { 

@Andrew-Lev
Copy link
Contributor

It sounds like adding a check for existing files in that directory with the targetFileName and then showing the error dialog would take care of this. I can fix this fairly quickly, want me to work on it?

@Andrew-Lev
Copy link
Contributor

Andrew-Lev commented Sep 1, 2017

Didnt take very long at all actually.

samefilenameerror

Andrew-Lev pushed a commit to Andrew-Lev/jabref that referenced this issue Sep 1, 2017
Linkfix in syncLang.py

Issue JabRef#3172 Added check for existing files when renaming linked file

Added a check in LinkedFileViewModel.rename() to see if a file which is
being renamed already exists in the target location.  If such a file is
found then an error popup occurs informing the user of the conflict.

Ran localization update.

updated changelog
@LinusDietz
Copy link
Member Author

Yeah, cool stuff! Just open the PR, and we'll have a look at it!

Andrew-Lev added a commit to Andrew-Lev/jabref that referenced this issue Sep 3, 2017
… file

Added a check in LinkedFileViewModel.rename() to see if a file which is
being renamed already exists in the target location.  If such a file is
found then an error popup occurs informing the user of the conflict.
@LinusDietz LinusDietz mentioned this issue Sep 5, 2017
6 tasks
@LinusDietz
Copy link
Member Author

fixed in #3211. Thanks @Andrew-Lev!

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

3 participants