INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: File length truncation in XML export  (Read 989 times)

Dean Roddey

  • Recent member
  • *
  • Posts: 19
File length truncation in XML export
« on: October 11, 2005, 06:47:19 pm »

Hey guys, a CQC customer was having trouble loading his exported XML file and I checked it out and one of the generated file names was 262 characters, which is over the legal length of 260, so Windows APIs were choking on the resulting path.

Are you guys doing any truncation at all, and this just happened to be slightly over, or are you doing truncation and are accidentally allowing it to get a little over the line?
Logged
Dean Roddey
droddey@charmedquark.com
Charmed Quark Systems

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42323
  • Shoes gone again!
Re: File length truncation in XML export
« Reply #1 on: October 11, 2005, 11:22:37 pm »

MC shouldn't ever be renaming files to be longer than MAX_PATH.

However, MAX_PATH is actually a soft limit, and it's easy to use Windows Explorer to make a file longer than this limit. (you can rename a parent folder of a long filename, etc.)  After this, Explorer itself will be confused.

In my opinion this is a filesystem bug.  In MC, we're careful to use a new define MAX_PATH_SAFE that's something much larger than 260. (1024 or more)  We also refuse to import files with too long of filenames because we know they'll just cause problems later in the program with Windows API calls.

So I'm not sure if that answers your question or not.  Just let us know if there are specific places in MC where you think we need more filename length checking.

Best,
-Matt
Logged
Matt Ashland, JRiver Media Center

Dean Roddey

  • Recent member
  • *
  • Posts: 19
Re: File length truncation in XML export
« Reply #2 on: October 12, 2005, 02:03:31 pm »

AFAIK, this file got created by just the usual ripping process, not by any import scenario or anything. The file name was:

\\Server\Shared Music\Beethoven (Cleveland Orchestra, George Szell)\Symphony No. 1, Symphony No. 6 -Pastoral-, -Egmont- Overature\Symphony No. 6 in F Major, Op. 68 _Pastoral_, I. Awakening of Cheerful Feelings Upon Arrival in the Country - Allegro ma non tropp

Now, what might have tripped you up is that he moved the files (via JR's utilities) from a UNC share based path, to a shared drive based path, and then back to a UNC based path. So perhaps somewhere in that operation, the extra characters got added?
Logged
Dean Roddey
droddey@charmedquark.com
Charmed Quark Systems
Pages: [1]   Go Up