Summary: | Batch item tool cannot process barcode file with Windows line endings | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | Tools | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Bugs List <koha-bugs> |
Severity: | normal | ||
Priority: | PATCH-Sent (DO NOT USE) | CC: | chris |
Version: | Main | ||
Hardware: | PC | ||
OS: | All | ||
URL: | /cgi-bin/koha/tools/batchMod.pl | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Proposed fix
Proposed fix, corrected |
Description
Chris Cormack
2010-05-21 01:27:21 UTC
Some info on IRC from the discussion of Bug 4973: pianohack > magnus: All chomp does is remove the line ending on the platform you're running on pianohack > linux server, windows client? magnus > yup magnus > adding $command_line =~ s/\r//g; solves it gmcharlt > s/\r$//g; would be slightly more precise pianohack > magnus: You might consider just replacing chomp entirely with s/[\r\n]*$//g Guessing this is the cause of this bug as well I looked for chomp in batchMod.pl: 174 chomp $content; And changed it based on the pianohack's suggestion: 174 $content = s/[\r\n]*$//g; This seems to fix the problem. Created attachment 2337 [details] [review] Proposed fix Created attachment 2345 [details] [review] Proposed fix, corrected Typo corrected Pushed, please test This bug is mentioned in: Fix for Bug 4451 Batch item tool can't process file with Windows line endings http://lists.koha-community.org/pipermail/koha-patches/2010-November/012978.html bug 4451 followup - don't need /g for this replace http://lists.koha-community.org/pipermail/koha-patches/2010-November/012979.html |