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

saveProject did not generate savefile #48

Open
shibacow opened this issue Feb 26, 2023 · 5 comments
Open

saveProject did not generate savefile #48

shibacow opened this issue Feb 26, 2023 · 5 comments
Assignees
Labels

Comments

@shibacow
Copy link

Current Behavior

ProjectController.saveProject(currentProject,File) did not generate savefile.

The save file appears in the folder for a moment, but when pc.saveProject(pc.getCurrentProject(),save_file) finishes, the save file disappears.

reproduced code

ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
pc.newProject();
File save_file = new File("save_project.gephi");
pc.saveProject(pc.getCurrentProject(),save_file);
if(save_file.exists()){
    System.out.println("save_project.gephi is not exists");
}

a moment when executed pc.saveProject function, save_project.gephi is appered in working folder.
but finished above funciton, saved file is removed.
so save_file.exists() is false.

reproduced version

  • gephi-toolkit-0.10.0-all.jar
  • gephi-toolkit-0.10.1-all.jar
  • gephi-toolkit-0.10.2-SNAPSHOT.jar

Use old version works fine.

useing gephi-toolkit-0.9.7-all.jar work fine.

ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
pc.newProject();
File save_file = new File("save_project.gephi");
pc.saveProject(pc.getCurrentProject(),save_file).run();

above code works fine.

misc

I guss this probrem relate those issue Problem when saving #2731

enviroment

java version 11
ubuntu 20.24 on windows 11 WSL2

@mbastian
Copy link
Member

mbastian commented Mar 8, 2023

Thanks for the report, I'll look into it

@mbastian
Copy link
Member

mbastian commented Mar 8, 2023

I'm able to reproduce this issue. It doesn't appear when the file already exists, which can be a workaround for now. In Gephi itself the file always seems to exists so it's only visible in the toolkit.

You can create an empty new file with File.createNewFile

@mbastian mbastian added the bug label Mar 8, 2023
@mbastian mbastian self-assigned this Mar 8, 2023
@shibacow
Copy link
Author

your workaround suggested is work fine. thanks.

@mbastian
Copy link
Member

Thanks, this will be permantly fixed for 0.10.2 version.

@shibacow
Copy link
Author

Thank you, looking forward to version 0.10.2.

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

No branches or pull requests

2 participants