ProgrammeVitam / sedatools

Bibliothèque SEDA et exemples d'usage
CeCILL Free Software License Agreement v2.1
12 stars 9 forks source link

Fix for xls 97 2003 on windows set file on readonly to avoid hash change #5

Closed JulienA closed 4 years ago

JulienA commented 5 years ago

Setting file on readonly to avoid hash change on file opening

JSLair commented 5 years ago

OK it's a real problem, and there's no good solution as it's anomalous behavior of the opening application... Your solution consisting in changing the writing rights on the files seems to be the best workaround.

But I'm a little bit embarrassed by changing all the files rights in sedalib. I would prefer to change them in Resip as it's the application dealing with user interaction. 2 possibilities: 1- simple: change the file's rights when opening (only two points in the code with Desktop.getDesktop().open... ) 2- more complex: in the import and add thread, at the end of each kind of import you can call a recursive function on the imported files directory to change the rights

If you don't need to change all the rights, I would really prefer the first one, but discussion is open!

JSLair commented 4 years ago

I have implemented the first alternative solution in https://github.com/ProgrammeVitam/sedatools/commit/386b61c7d963ebfa74c9153b57278f845924b137