gama-platform / gama

Main repository for developing the 2024+ versions of GAMA
https://gama-platform.org
GNU General Public License v3.0
11 stars 4 forks source link

Problems with symlinks #203

Open lesquoyb opened 1 month ago

lesquoyb commented 1 month ago

Describe the bug We recently had a gama training and distributed individual models to students. And some of them were not able to make it work for seemingly no reason: gama would raise a java out of bounds exception when loading a shapefile that would work well on other computers. In addition to this, when creating a new model inside the current project and copy pasting the code, everything was working well, but if we copy pasted the model file directly it still wouldn't work. Turns out that the issue was that some students opened the model by double clicking on the file in their OS's file browser, which tries to open it in gama and opens a wizard to pick in which project to add the file, which silently created a symlink. I think there are many linked problems here:

  1. The exception raised should have been a file not found exception but for some reason it was an array out of bounds
  2. when importing a file by simply double clicking it, we should have the choice between copy or symlink as it's the case when we go through the menus inside of gama
  3. I think it would be VERY USEFUL to have an icon or something that is visible in the project view to see the files that are symlinks
  4. The paths are interpreted as starting from the physical location of the file and not the location in the project, which I think has been debated already, but maybe it's not that much of a good idea