| Project: | PDF Include project |
| Component: | Code |
| Category: | feature request |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | active |
Problem:
Using PDFextract.p as example; Multiple Users running same program can cause all sessions to APPEND to the same filename.
Line2748:
OUTPUT TO VALUE(SESSION:TEMP-DIR + pID + String(pPage) + ".txt") BINARY NO-MAP NO-CONVERT APPEND.
Patch that fixed problem in our unix environment:
DEF VAR uniqie_id AS CHAR NO-UNDO.
DEF VAR form_uniq AS CHAR NO-UNDO.
ASSIGN
unique_id = ENCODE(STRING(TODAY) + STRING(ETIME) + pFileName)
form_uniq = SESSION:TEMP-DIR + unique_id + "-".
OUTPUT TO VALUE(form_uniq + pID + String(pPage) + ".txt") BINARY NO-MAP NO-CONVERT APPEND.
Comments
#1
the progress standard libraries has a function that adds a counter to the file name incase the file already exists, for example, c:\test(1).p that you could also use.
http://www.oehive.org/project/lib
{slibos.i} message os_getNextFile( "c:\test.p" ).