Open msoutopico opened 1 year ago
Thomas Cordonnier is working on integrating the OMT plugin in OmegaT, so perhaps it would be good to wait until that's done and apply the patch directly in the OmegaT code base rather than in the plugin.
I would be a bit cautious reading and writing outside the project folder. It could be really easy to accidentally replace files on the recipient computer (either maliciously or not), or fail because lack of sufficient access rights, or use a different directory scheme (omt created on linux and imported on windows, etc)
Background
Project folder paths are editable (replacing the
__DEFAULT__
value with the actual path to the folder). For example, it's possible to load source files from a custom source folder.Precondition
/home/USER/foo/PROJECT/
/home/USER/foo/PROJECT/source/
Steps to reproduce
/home/USER/bar/source_files/
Expected results
The source folder in the project package contains the files found in
/home/USER/bar/source_files/
Actual results
The source folder in the project package contains the files found in
/home/USER/foo/PROJECT/source/
Comments
This behaviour could be made optional with a
pack-custom-folders=true|false
option in the properties file.If the value is
true
, the files of the external folder are packed and the folder path becomes__DEFAULT__
in theomegat.project
file.If the value is
false
, the current behavior will be maintained: the default folder is packed and the path to the external folder is maintained in theomegat.project
file.