Opened 12 years ago

Closed 12 years ago

Last modified 9 years ago

#804 closed defect (fixed)

Handling brackets in (windows) filepath

Reported by: ak19 Owned by: ak19
Priority: moderate Milestone: 2.86 Release
Component: Greenstone2&3 Severity: major
Keywords: Cc:

Description

Changes to batch files and perl code to deal with brackets in (Windows) filepath.

Checked through all batch files belonging to Greenstone, including winmake.bat files, to see if any changes were needed there.

All the occurrences of

in perllib, bin\script and cgi-bin were inspected for whether they needed changing as well to handle brackets in filepaths, since replacements of
by

may require ( and ) to be escaped as well. This was already found to be necessary in util.pm's filename_within_directory() subroutine, so util's filename_to_regex() was expanded to escape brackets () as well. cgi-bin required no changes.

Commit revision 24829, except for GS2\makegs2.bat and GLI\gems.bat

  1. 5 files toplevel Greenstone:

gs2-server.bat, gs2-web-server.bat, gsicontrol.bat, findjava.bat, makegs2.bat (commit 24820)

makegs2.bat commit message: To compile apache-httpd correctly if there are spaces in the path to the GS2 installation, have added a line that runs the command prompt in short-filename mode. This is useful since we don't want to have to correct the apache-httpd bat files, but still want them to work with spaces in the filepath. Since the command prompt itself is made to work in short-filename mode, the pathname will now no longer contain spaces when the compilation phase comes to compiling up the apache-httpd.

  1. 5 files in GLI:

gli.bat, client-gli.bat, findjava.bat, makejar.bat, gems.bat (commits 24826 to 24828)

The 3 changes for gems.bat have to do with the file's mime-type having been marked as binary instead of text and an svn diff on it not being possible.

  1. perllib: inexport.pm, util.pm, strings.properties

plugins: DirectoryPlugin.pm

plugouts: BasePlugout.pm, DSpacePlugout.pm, FedoraMETSPlugout.pm

  1. bin\script: explode_metadata_database.pl, wvware.pl, schedule.pl

Where schedule.pl does not have any other changes than printing a warning if there are spaces and/or brackets in the filepath. The warning message is in perllib\string.properties

Attachments (1)

3-copy1.jpg (79.1 KB ) - added by domtheo 10 years ago.
Muslim wedding organizer, Muslim wedding organizer bekasi

Download all attachments as: .zip

Change History (11)

comment:1 by ak19, 12 years ago

Commit 24832: makegs2.bat, perllib/util.pm

  1. util.pm's envvar_prepend and append subroutines now escape backslashes for internal regex operations not only for windows but throughout, and the filename_to_regex subroutine also escapes backslashes for all OS now.
  1. makegs2.bat prints a warning at the very end to tell the user that the command prompt has been left in shortfilename mode.

comment:2 by ak19, 12 years ago

Milestone: 2.86 Release

comment:3 by ak19, 12 years ago

Resolution: fixed
Status: newclosed

comment:4 by ak19, 12 years ago

  1. Older commits. The following are revision numbers for corrections to gsicontrol.bat where spaces needed to be handled (again) after the introduction of the reset-gsdlhome target.

24789, 24788, 24786, 24765, 24759

  1. NEW COMMIT: http://trac.greenstone.org/changeset/24904

Need quotes around collecthome in gsdlsite.cfg to handle spaces and brackets in any non-standard collecthome path.

  • gsicontrol.bat
  • gli/src/org/greenstone/gatherer: Gatherer.java, gui/GUIManager.java

comment:5 by ak19, 12 years ago

http://trac.greenstone.org/changeset/24905

Now that quotes are necessary around collecthome in gsdlsite.cfg (if there are spaces in the collecthome path), this needs to propagate into GLI. A dialog pops up on GLI exit if collecthome has changed. But collecthome has not changed if all that's been added is quotes around the collecthome variable as read from gsdlsite.cfg.

Changes to gli/src/org/greenstone/gatherer: Gatherer.java, gui/GUIManager.java

comment:6 by robertthomas, 10 years ago

The most up to date listing of coupons for jabong. Our editors check coupon codes to ensure validity every day.

comment:7 by robertthomas, 10 years ago

The most up to date listing of coupons for fabfurnish. Our editors check coupon codes to ensure validity every day.

Note: See TracTickets for help on using tickets.