home *** CD-ROM | disk | FTP | other *** search
- PROBLEM WITH DOSCOPY()
- ----------------------
-
- I believe that the DosCopy() subroutine has a defect that
- prevents reliable date and time stamp setting of the target file
- when copying from a remote DOS LAN server to a local OS/2 2.0
- filesystem.
-
- I was recently informed of a situation in which a file copy
- utility that I wrote (ccp - conditional copy) was incorrectly
- setting the date and time of target files. The ccp program
- uses the DosCopy() subroutine to perform any actual file copy
- operations.
- .
- For example, the bldtt.asm file had a source date and time of
- 6/28/91 and 12:55p. After the copy, its target date and time
- was 6/22/96 and 5:07p. In fact, about 400 files out of a
- total of 2000 files had incorrect date and time stamps after
- the copy. (The incorrect target date and time stamps are
- neither those of the source file nor those of the current time
- and date.) The results appear repeatable: the same files get
- the same bad timestamps each time.
- .
- The environment is as follows:
-
- 1) The ccp (conditonal copy) program, a 16-bit OS/2
- application, is running on an OS/2 2.0 system. It
- uses the DosCopy() subroutine to perform the copy
- operation on each file that needs to be copied.
-
- 2) The source files exist on a DOS machine running LAN
- Server. The local OS/2 2.0 machine accesses the DOS
- machine's files via a remote drive that is set up by
- the NET USE command.
-
- 3) About 2000 files were copied. Of these, about 400
- files had date and time stamps on the OS/2 2.0 system
- that did not match the date and time stamp of the
- source file on the DOS system. (No data was lost or
- corrupted, though).
-
- 4) The results are repeatable: Files that copy ok
- always copy ok. Files that get an incorrect target
- date and time always get the same incorrect date and
- time.
-
- The standard COPY command & DOS-only version of ccp did not fail
-
- 1) The built-in OS/2 COPY command correctly set the
- date and time stamps of the target files.
-
- 2) The DOS-only version of ccp also set the date and
- time stamps of the target files correctly.
- .
- Notes about the ccp program:
-
- (a) The OS/2-only version was developed on OS/2 1.3 using C2
- 1.1 and the OS/2 1.3 toolkit. Once it determines the
- exact source and target names of a file to copy,it calls
- the DosOpen subroutine to perform the actual copy.
-
- (b) The DOS-only version was developed using the C/2 1.1 on a
- DOS machine. It uses the open, close, read, and write
- subroutines to copy the file's data (it ignores EAs). It
- also uses the _dos_setftime and _dos_setfileattr
- subroutines to set a target file's date, time, and
- attributes to those of the source file.
-
- -------------------------------------------------------------------------------
- Thank you for calling the OS/2 2.0 Support Line. Regarding the problem
- reported to the Support Line, we feel that this information may assist
- you in resoloving your problem. If you still require assistance, please
- call 1-800-237-5511, and reference your customer number and problem (PMR)
- number. Your Problem Record Number (PMR) should appear on the cover
- page of this faxed document.