INTERACT FORUM

Please login or register.

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

Author Topic: Long File Name Failing to Import  (Read 1915 times)

sarcanon

  • Recent member
  • *
  • Posts: 36
Long File Name Failing to Import
« on: April 25, 2021, 10:17:56 am »

Hello.

I continue to get failures, or rather, "skips", when importing some files.

Running Media Center 27.0.82 under Windows 10 Pro. "Support extra long file names" is checked in Options -> General -> Advanced.

Excerpts from import results dialog:

Code: [Select]
Library now has 231241 files. Search and update took 0:34.

Imported 217 new files.
Updated 5 files that had external changes.
Failed to import 5 files.
Skipped 239 files (filename too long).

In-depth details:
Imported:
    [...]

Updated:
    [...]

Failed to import:
    [...]

Skipped (filename too long):
    P:\classical-split\Bach-Sacred Vocal Works-Bach 2000\B2000-ScrdVcl-11-14\CD11 - Christmas Oratorio (1)\Bach - Sacred Vocal Works (Bach2000 - Vol.6 CD11 - Christmas Oratorio-I) - Nikolaus Harnoncourt (1 - Christmas Oratorio, in six parts, BWV 248 (BC D7)_ Chor_ Jauchzet, Fro.flac
    P:\classical-split\Bach-Sacred Vocal Works-Bach 2000\B2000-ScrdVcl-11-14\CD11 - Christmas Oratorio (1)\Bach - Sacred Vocal Works (Bach2000 - Vol.6 CD11 - Christmas Oratorio-I) - Nikolaus Harnoncourt (1 - Christmas Oratorio, in six parts, BWV 248 (BC D7)_ Chor_ Jauchzet, Fro_flac_JRSidecar.xml
    [...]

Any idea on how I can work around this (other than modifying the file paths)?

Thank you.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42376
  • Shoes gone again!
Re: Long File Name Failing to Import
« Reply #1 on: April 26, 2021, 07:04:00 am »

Running 27.0.85 I made a file:
D:\classical-split\Bach-Sacred Vocal Works-Bach 2000\B2000-ScrdVcl-11-14\CD11 - Christmas Oratorio (1)\Bach - Sacred Vocal Works (Bach2000 - Vol.6 CD11 - Christmas Oratorio-I) - Nikolaus Harnoncourt (1 - Christmas Oratorio, in six parts, BWV 248 (BC D7)_ Chor_ Jauchzet, Fro.flac

Put that folder in auto-import, and it imported fine.

So I'm not sure.  Maybe you should try a new library just as a test?  Also update MC.
Logged
Matt Ashland, JRiver Media Center

sarcanon

  • Recent member
  • *
  • Posts: 36
Re: Long File Name Failing to Import
« Reply #2 on: April 26, 2021, 11:25:25 am »

So I'm not sure.  Maybe you should try a new library just as a test?  Also update MC.

Thanks for your reply.

I have upgraded to 27.0.85. I then created a new library and imported the contents of the entire volume which has the files that were previously skipped. I get exactly the same result.

Code: [Select]
Library now has 125510 files. Search and update took 1:00:41.

Imported 122080 new files.
Updated 3430 files that had external changes.
Failed to import 3430 files.
Skipped 239 files (filename too long).

In-depth details:
Imported:
[...]
    <too many items to display>

Updated:
[...]

Failed to import:
[... 3,430 .CUE files...]


Skipped (filename too long):
    P:\classical50-split\Bach-Sacred Vocal Works-Bach 2000\B2000-ScrdVcl-11-14\CD11 - Christmas Oratorio (1)\Bach - Sacred Vocal Works (Bach2000 - Vol.6 CD11 - Christmas Oratorio-I) - Nikolaus Harnoncourt (1 - Christmas Oratorio, in six parts, BWV 248 (BC D7)_ Chor_ Jauchzet, Fro.flac
[...]

Any other ideas?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42376
  • Shoes gone again!
Re: Long File Name Failing to Import
« Reply #3 on: April 26, 2021, 12:35:17 pm »

It looks to me like it should only hit that if the "Support Extra Long Filenames" option is not set?
Logged
Matt Ashland, JRiver Media Center

sarcanon

  • Recent member
  • *
  • Posts: 36
Re: Long File Name Failing to Import
« Reply #4 on: April 26, 2021, 01:25:53 pm »

It looks to me like it should only hit that if the "Support Extra Long Filenames" option is not set?

Yes, as mentioned in my original post, "Support extra long file names" is checked in Options -> General -> Advanced.

Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42376
  • Shoes gone again!
Re: Long File Name Failing to Import
« Reply #5 on: April 26, 2021, 01:33:09 pm »

Well I'm confused because the only way a file can be classified as too long is this:
Code: [Select]
else if ((strFilename.GetLength() >= MAX_PATH) && (g_spOptions->Get(_T("Support Extra Long Filenames"), false) == false)) // MAX_PATH is (MAX_PATH - 1) characters to leave room for null termination
{
// skip filenames that are too long
Skips.m_aryFilenameTooLong.Add(strFilename);
}

Maybe double-check the registry to see what "Support Extra Long Filenames" is set to?
Logged
Matt Ashland, JRiver Media Center

sarcanon

  • Recent member
  • *
  • Posts: 36
Re: Long File Name Failing to Import
« Reply #6 on: April 26, 2021, 01:51:04 pm »

Well I'm confused because the only way a file can be classified as too long is this:
Code: [Select]
else if ((strFilename.GetLength() >= MAX_PATH) && (g_spOptions->Get(_T("Support Extra Long Filenames"), false) == false)) // MAX_PATH is (MAX_PATH - 1) characters to leave room for null termination
{
// skip filenames that are too long
Skips.m_aryFilenameTooLong.Add(strFilename);
}

Maybe double-check the registry to see what "Support Extra Long Filenames" is set to?

Sure. What is the registry key to check?

FWIW, another data point: I wanted to see if my shortening one of the file paths and importing would reveal whether the path name was the only thing preventing it from being imported. When I attempted to edit the file name in File Explorer, my changes were rejected. I.e., I selected the file, edited the name to something shorter, hit Enter, and the original file name was restored. No errors or any dialogs. File Explorer would simply not allow me to rename the file. I checked the file's properties in File Explorer, and it's not marked Read-only, so read/write status is not a factor. I've never seen that happen before. Maybe this is an OS level issue?
Logged

Vocalpoint

  • Citizen of the Universe
  • *****
  • Posts: 2007
Re: Long File Name Failing to Import
« Reply #7 on: April 26, 2021, 01:53:12 pm »

Sure. What is the registry key to check?Maybe this is an OS level issue?

If it's longer than 255 characters - it will be an OS issue.

Exactly how long is "long" in your case and why the need for something so long within the OS?

VP
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42376
  • Shoes gone again!
Re: Long File Name Failing to Import
« Reply #8 on: April 26, 2021, 01:57:37 pm »

HKEY_CURRENT_USER\SOFTWARE\JRiver\Media Center 27\Properties\Support Extra Long Filenames

If that's true, the file should not be getting specified as too long like the log you posted.
Logged
Matt Ashland, JRiver Media Center

BigSpider

  • Galactic Citizen
  • ****
  • Posts: 352
Re: Long File Name Failing to Import
« Reply #9 on: April 26, 2021, 03:50:18 pm »

You might also want to check
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
to verify the presence of LongPathsEnabled and that it is set to a value of 1 (true)
Logged
English spiders are kind of small, but when I was living in the African rain forest well ......

sarcanon

  • Recent member
  • *
  • Posts: 36
Re: Long File Name Failing to Import
« Reply #10 on: April 26, 2021, 04:00:44 pm »

You might also want to check
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
to verify the presence of LongPathsEnabled and that it is set to a value of 1 (true)

This key exists and is set to 1.

HKEY_CURRENT_USER\SOFTWARE\JRiver\Media Center 27\Properties\Support Extra Long Filenames

If that's true, the file should not be getting specified as too long like the log you posted.

This key does not exist, which is odd, since the checkbox in the Options dialog is set. If I create this key, what value and type should I give it? REG_DWORD with value of 1?

Thanks.
Logged

BigSpider

  • Galactic Citizen
  • ****
  • Posts: 352
Re: Long File Name Failing to Import
« Reply #11 on: April 26, 2021, 04:15:39 pm »

Have you rebooted your system since setting the long filename option in JRiver?

Logged
English spiders are kind of small, but when I was living in the African rain forest well ......

sarcanon

  • Recent member
  • *
  • Posts: 36
Re: Long File Name Failing to Import
« Reply #12 on: April 26, 2021, 04:24:37 pm »

Have you rebooted your system since setting the long filename option in JRiver?

Thank you for the suggestion. I have not, because I did not know it was necessary. I will try that shortly and report back.
Logged

BigSpider

  • Galactic Citizen
  • ****
  • Posts: 352
Re: Long File Name Failing to Import
« Reply #13 on: April 26, 2021, 04:28:44 pm »

If the keyword doesn't show up Matt has already given you the name Support Extra Long Filenames
it should have it's value set to 1
Logged
English spiders are kind of small, but when I was living in the African rain forest well ......

sarcanon

  • Recent member
  • *
  • Posts: 36
Re: Long File Name Failing to Import
« Reply #14 on: April 26, 2021, 05:01:58 pm »

Thank you for the suggestion. I have not, because I did not know it was necessary. I will try that shortly and report back.

Okay, I rebooted, launched Media Center, and attempted to Run Auto-Import Now again. Again, same results, 239 files skipped.

I then went to Options yet again to look at the Support Long File Names preference. The box was still ticked. HOWEVER, when I attempted to close the Options dialog, I was prompted to saved changed settings. Which made no sense, since I did not change any settings while in the Options dialog. But nevertheless, I clicked OK to save changes, and performed Run Auto-Import Now once more time. This time, all files were imported with no skipped files!

This is very strange. I ticked the Support Long File Names checkbox at least a half dozen system restarts ago. Every time I looked at that value in the intervening (probably a least a dozen times), the box was ticked. So apparently Media Center was persisting that setting value the whole time. Why, out-of-the-blue, would I suddenly be prompted to save save changes in a dialog in which I had made no changes during the current session? To me, it appears as though Media Center was persisting the unsaved change through multiple cycles of both the machine and Media Center itself, and after the latest system restart finally decided to flag that setting as a changed value that needed to be saved (or discarded).

So rather than anything being amiss in the file importing code, it seems to me the problem may lay in the code that controls persistence of changes in the Options dialog. Just speculation, of course, but it's the only scenario that potentially explains the behavior I've seen. Anyway, as a software developer myself, that's where I would start looking. But for the moment, I'm just pleased I no longer have any import errors.

Thanks to all who offered suggestions.

Logged

BigSpider

  • Galactic Citizen
  • ****
  • Posts: 352
Re: Long File Name Failing to Import
« Reply #15 on: April 26, 2021, 05:22:25 pm »

It looks to me that you didn't save the changes to the system which you had made. Easy to do in the heat of the moment, but not something that a software engineer can compensate for. Although to be fair it is a mystery why you have to tick a box when MC could check whether long file names has been enabled in the OS and then automatically set it up to be the default case. As you said , the longfilenames had been set as true in the OS configuration,  so why is MC asking you to enable it? Anyway with about 32,000 characters available you are at the beginning of a journey to discovering how complex your filing system can become. For me simple is sustainable. :)
Logged
English spiders are kind of small, but when I was living in the African rain forest well ......

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3119
Re: Long File Name Failing to Import
« Reply #16 on: April 26, 2021, 09:00:00 pm »

It looks to me that you didn't save the changes to the system which you had made.

He says when he goes into Options, the item is already checked. And, the MC registry entry for long file names  is set. Seems like the changes must have been saved. It seems like there may be more going here than just user oversight.
Logged

Vocalpoint

  • Citizen of the Universe
  • *****
  • Posts: 2007
Re: Long File Name Failing to Import
« Reply #17 on: April 26, 2021, 10:29:41 pm »

He says when he goes into Options, the item is already checked. And, the MC registry entry for long file names  is set. Seems like the changes must have been saved. It seems like there may be more going here than just user oversight.

I still get this the odd time (at least in v26)- I will go into Options - look into a specific area - click around but do nothing - Click Cancel to close the dialog and MC asks if I want to save changes.

It is a hard one to test and reproduce - but I have experienced it a number of times in the past...

VP
Logged
Pages: [1]   Go Up