MAJ (Enregistre & Sauvegarde sur Mac et Linux)

This commit is contained in:
pablo rodriguez 2022-11-25 08:26:06 +01:00
parent e916ce2ebf
commit 617ce458c8
5 changed files with 6 additions and 9 deletions

Binary file not shown.

Binary file not shown.

View File

@ -50,20 +50,18 @@ public class actSaveAs extends AbstractAction{
try {
verificationFichierAnalyse.MiseAJourHashNomFichierAnalyse(fileToSave.getName());
if(commandes.os.contains("Mac")||commandes.os.contains("Li")) {
Run.ecritureNodeEnXML(commandes.sujet, fileToSave.getName(), fileToSave.getPath().substring(0,fileToSave.getPath().lastIndexOf("/")),"sujet" );
}
if(commandes.os.contains("Win")) {
Run.ecritureNodeEnXML(commandes.sujet, fileToSave.getName(), fileToSave.getPath().substring(0,fileToSave.getPath().lastIndexOf("\\")),"sujet" );
}else {
Run.ecritureNodeEnXML(commandes.sujet, fileToSave.getName(), fileToSave.getPath().substring(0,fileToSave.getPath().lastIndexOf("/")),"sujet" );
}
commandes.nameSujet = fileToSave.getName();
if(commandes.os.contains("Win")) {
commandes.PathFilenameAnalysis = fileToSave.getPath().substring(0,fileToSave.getPath().lastIndexOf("\\"));
}
if(commandes.os.contains("Mac")||commandes.os.contains("Li")) {
}else{
commandes.PathFilenameAnalysis = fileToSave.getPath().substring(0,fileToSave.getPath().lastIndexOf("/"));
}

View File

@ -63,9 +63,8 @@ public class filechooserXML extends JFileChooser {
if(commandes.os.contains("Win")) {
commandes.path = file.getPath().substring(0,file.getPath().lastIndexOf("\\")); // Sur Windows
}
if(commandes.os.contains("Mac")||commandes.os.contains("Li")) {
commandes.path = file.getPath().substring(0,file.getPath().lastIndexOf("/")); // Sur mac
}else {
commandes.path = file.getPath().substring(0,file.getPath().lastIndexOf("/")); // Sur mac & Linux
}
commandes.PathFilenameAnalysis = getCurrentDirectory().getPath();