Wednesday, September 30, 2015

Store Relative Paths if Possible

Semi-recently, I was working with a program that managed many files as part of a project. I was collaborating on this project, so I placed the project folder and all of its files in a shared Dropbox folder. However, there was a problem - the program could not open the project file on any other computer because it stored absolute paths to the files it depended on. I was able to work around it; because the program ran under DOSBox, changing the drive and folder structure to be the same everywhere was not too difficult.

That experience was rather inconvenient, and I wish more programs that reference multiple files in a binder of some sort would make an effort to store only relative paths. That way, people can collaborate more easily, and the project can be moved around on the same computer (or backed up) without problems. Optimally, warnings should be produced if the user adds files to the project that are not in the project's root directory or a subdirectory thereof.

No comments:

Post a Comment