User forums > General (but related to Code::Blocks)
Quite off topic
thomas:
After implementing export with archive generation (to build source releases) into the svn plugin, I encountered a "bug" which I've been struggling all day. Sometimes, it would fail for no obvious reason.
Now I have come to a really weird conclusion: There is no bug at all. Instead, it is as simple as this: tar under Windows (either msys or cygwin) cannot handle pathnames longer than 31 characters.
This sounds so hilarious, it can hardly be true, but it really seems to be the case.
Did anyone else experience that, too, or am I missing something?
--- Code: ---D:\desktop>tar -cf D:/Desktop/SomeFolder/a.tar a.txt
tar: Cannot execute remote shell: No such file or directory
tar: D\:/Desktop/SomeFolder/a.tar: Cannot open: Input/Output error
tar: Error is not recoverable: exiting now
D:\desktop>mv SomeFolder SoFo
D:\desktop>tar -cf D:/Desktop/SoFo/a.tar a.txt
D:\desktop>mv SoFo Some
D:\desktop>tar -cf D:/Desktop/Some/a.tar a.txt
D:\desktop>mv Some SomeF
D:\desktop>tar -cf D:/Desktop/SomeF/a.tar a.txt
tar: Cannot execute remote shell: No such file or directory
tar: D\:/Desktop/SomeF/a.tar: Cannot open: Input/Output error
tar: Error is not recoverable: exiting now
--- End code ---
Profic:
Msys shell:
--- Code: ---Profic@PROFIC-NBOOK /e/work/web/SDN/recipe-nddocs/cpp
$ tar cf /e/work/web/SDN/recipe-nddocs/cpp/rtfReader.tar rtfReader
Profic@PROFIC-NBOOK /e/work/web/SDN/recipe-nddocs/cpp
$
--- End code ---
cmd shell:
--- Code: ---E:\work\web\SDN\recipe-nddocs\cpp>c:\devel\msys\bin\tar cf e:\work\web\SDN\recipe-nddocs\cpp\rtfReader.tar rtfReader
/bin/tar: e\:\\work\\web\\SDN\\recipe-nddocs\\cpp\\rtfReader.tar: Cannot open: I/O error
/bin/tar: Error is not recoverable: exiting now
E:\work\web\SDN\recipe-nddocs\cpp>c:\devel\msys\bin\tar cf /e/work/web/SDN/recipe-nddocs/cpp/rtfReader.tar rtfReader
E:\work\web\SDN\recipe-nddocs\cpp>
--- End code ---
So, yes, problem is there.
thomas:
Thanks for the reply :)
So well... that kind of stinks. Considering the "normal" length of file paths in Windows, this effectively makes tar unusable, except if you agree to cd to the respective directory, create the archive there, and copy it to another destination later.
I've changed my code now so that tar writes to wxFileName::CreateTempFileName(). TemFileNames are usually 6-7 characters, so that leaves 24 characters for %TEMPDIR% :?
After tar has finished, the file is moved to and renamed to what it should have been in the first place. Nasty hack, cannot say I like that. But oh well... it works.
takeshimiya:
Are you using the latest tar 1.15.1 ?
http://www.gnu.org/software/tar/tar.html
http://directory.fsf.org/tar.html
thomas:
No, the version that comes with the most recent msys, that's 1.13.25.
Will check out the 1.15.1 version for curiosity, but I assume that most people will have not much more recent versions than the one I use, so I'll have to keep the temp file hack anyway.
EDIT:
Version number hell, again... the msys one is 1.13.19. Cygwin has version 1.13.25.
Navigation
[0] Message Index
[#] Next page
Go to full version