Hi
I wrote my own little copy program which mostly works with CopyFile. It does so quite well but it fails on some file(name)s. Here is the trace of copying two files with admittedly unusual filenames:
trace:file:CopyFileW L"_ConfigurationType._TemplInfoLinkMaster_" -> L"C:\imp2\Config\_ConfigurationType._TemplInfoLinkMaster_" trace:file:CreateFileW L"_ConfigurationType._TemplInfoLinkMaster_" GENERIC_READ FILE_SHARE_READ FILE_SHARE_WRITE OPEN_EXISTING attributes 0x0 FABI: FILE: FILE_CreateFile: /home/fabi/winec/IMD/Templates/InosConfiguration/_ConfigurationType._TemplInfoLinkMaster_ trace:file:CreateFileW returning 0x10 trace:file:GetFileInformationByHandle 0x10 trace:file:CreateFileW L"C:\imp2\Config\_ConfigurationType._TemplInfoLinkMaster_" GENERIC_WRITE FILE_SHARE_READ FILE_SHARE_WRITE CREATE_ALWAYS attributes 0x20 FABI: FILE: FILE_CreateFile: /home/fabi/winec/imp2/Config/_ConfigurationType._TemplInfoLinkMaster_ trace:file:CreateFileW returning 0x28 trace:file:ReadFile 0x10 0x408ceeb0 2048 0x408ceea8 (nil) trace:file:WriteFile 0x28 0x408ceeb0 130 0x408ceeac (nil) trace:file:ReadFile 0x10 0x408ceeb0 2048 0x408ceea8 (nil)
trace:file:CopyFileW L"_ConfigurationType._TemplInfoPpcISM_" -> L"C:\imp2\Config\_ConfigurationType._TemplInfoPpcISM_" trace:file:CreateFileW L"_ConfigurationType._TemplInfoPpcISM_" GENERIC_READ FILE_SHARE_READ FILE_SHARE_WRITE OPEN_EXISTING attributes 0x0 FABI: FILE: FILE_CreateFile: /home/fabi/winec/IMD/Templates/InosConfiguration/_ConfigurationType._TemplInfoPpcISM_ trace:file:CreateFileW returning 0x10 trace:file:GetFileInformationByHandle 0x10 trace:file:CreateFileW L"C:\imp2\Config\_ConfigurationType._TemplInfoPpcISM_" GENERIC_WRITE FILE_SHARE_READ FILE_SHARE_WRITE CREATE_ALWAYS attributes 0x20 FABI: FILE: FILE_CreateFile: /home/fabi/winec/imp2/Config/_ConfigurationType._TemplInfoPpcISM_ trace:file:CreateFileW returning 0x28 trace:file:ReadFile 0x10 0x408ceeb0 2048 0x408ceea8 (nil) trace:file:WriteFile 0x28 0x408ceeb0 124 0x408ceeac (nil) trace:file:ReadFile 0x10 0x408ceeb0 2048 0x408ceea8 (nil)
There are several files like that but in the destination directory I get only one single file with the name "_ConfigurationType" with which they all begin with. The content is the one from the last file being copied. So it looks like the CreateFile somehow messed up the name as everything else worked and copied all files over each other. I traced it until the call to the server in FILE_CreateFile. I only had a look at the server code but couldn't see anything where the filename is analyzed (except for .exe and .com). Other files are copied without any problem, with or without extension, even extensions longer than 3 chars.
But it gets even weird. My copy tool is a Win32 CLI app. I have a batch file which calls this copy tool to copy several files (of course). If this batch file again is called from a Win32 MFC+GUI app I get this described error. But if I call it directly with wineconsole batch.bat the whole copying works. So it may have to do with execution/redirection. But I'm out again.
Anything I could test?
Thanks
bye Fabi
FILE: FILE_CreateFile: /home/fabi/winec/imp2/Config/_ConfigurationType._TemplInfoLinkMaster_
There are several files like that but in the destination directory I get only one single file with the name "_ConfigurationType" with which they all begin with. The content is the one from the last file being copied. So it looks like the CreateFile somehow messed up the name as everything else worked and copied all files over each other. I traced it until the call to the server in FILE_CreateFile. I only had a look at the server code but couldn't see anything where the filename is analyzed (except for .exe and .com). Other files are copied without any problem, with or without extension, even extensions longer than 3 chars.
But it gets even weird. My copy tool is a Win32 CLI app. I have a batch file which calls this copy tool to copy several files (of course). If this batch file again is called from a Win32 MFC+GUI app I get this described error. But if I call it directly with wineconsole batch.bat the whole copying works. So it may have to do with execution/redirection. But I'm out again.
Actually that's wrong :) It works if I call the copy tool directly with wine. But calling the batch file with wineconsole gives the same error. So it could be that wineconsole/batch files/dos mode/whatever don't like the very long extensions or the chars contained. Yep, it doesn't like the _ after the dot. After removing the underscore it works also with the wineconsole. Any ideas?
bye Fabi
Actually that's wrong :) It works if I call the copy tool directly with wine. But calling the batch file with wineconsole gives the same error. So it could be that wineconsole/batch files/dos mode/whatever don't like the very long extensions or the chars contained. Yep, it doesn't like the _ after the dot. After removing the underscore it works also with the wineconsole. Any ideas?
Seems like that was an error on my side. The copying went fine but there was an +*รง%" command after the copy in the batchfile which changed the files. That's why I thought the copy went wrong. Sorry for the noise.
bye Fabi