INTERACT FORUM

Please login or register.

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

Author Topic: Expression bug with FileVolume() and portable install  (Read 1896 times)

DanielBuus

  • Recent member
  • *
  • Posts: 30
Expression bug with FileVolume() and portable install
« on: September 08, 2009, 11:35:11 am »

Helloooo :)

Just found this bug while fiddling with the expression editor. FileVolume() returns the two first characters of the path, not the volume. I.e. when the path is "(Install Drive):\Some\Dir\Etc...", FileVolume returns "(I", and not "(Install Drive):".

Btw, is there any way to control the behavior of when MC uses (Install Drive) rather than the drive letter? It seems to be a bit up to the mood of MC at any given time, and ATM I have a ton of duplicates on X:\ and (Install Drive):\ respectively...

Cheers,
Daniel :)
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41988
  • Shoes gone again!
Re: Expression bug with FileVolume() and portable install
« Reply #1 on: September 08, 2009, 12:18:07 pm »

Helloooo :)

Hi.  You haven't posted for a while, so welcome back.


Quote
Just found this bug while fiddling with the expression editor. FileVolume() returns the two first characters of the path, not the volume. I.e. when the path is "(Install Drive):\Some\Dir\Etc...", FileVolume returns "(I", and not "(Install Drive):".

Should be fixed in a coming build.


Quote
Btw, is there any way to control the behavior of when MC uses (Install Drive) rather than the drive letter? It seems to be a bit up to the mood of MC at any given time, and ATM I have a ton of duplicates on X:\ and (Install Drive):\ respectively...

It's a bug if it's using X:\, so please report how you get it to do that.

Thanks.
Logged
Matt Ashland, JRiver Media Center

DanielBuus

  • Recent member
  • *
  • Posts: 30
Re: Expression bug with FileVolume() and portable install
« Reply #2 on: September 08, 2009, 12:34:31 pm »

Hi, thanks for the reply and for the welcome back :D

Good to hear about the upcoming fix :)

The reason it's using x:\ is because that's the drive I've installed to using the portable install option, and also the drive containing all my media files (it's a shared network drive) :)
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41988
  • Shoes gone again!
Re: Expression bug with FileVolume() and portable install
« Reply #3 on: September 08, 2009, 12:38:22 pm »

The reason it's using x:\ is because that's the drive I've installed to using the portable install option, and also the drive containing all my media files (it's a shared network drive) :)

Right, but we try to convert X:\ to (Install Drive:) anytime it's stored so that it remains portable.  Are there cases where it's storing X:\, and if so, how could we reproduce it?

Thanks.
Logged
Matt Ashland, JRiver Media Center

DanielBuus

  • Recent member
  • *
  • Posts: 30
Re: Expression bug with FileVolume() and portable install
« Reply #4 on: September 08, 2009, 12:49:31 pm »

Quote
Right, but we try to convert X:\ to (Install Drive:) anytime it's stored so that it remains portable.  Are there cases where it's storing X:\, and if so, how could we reproduce it?

Ah, right. I'm afraid my memory's a big vague on that right now (been awhile since my last MC visit ;) ). It could very well just be me, it could be that fact that I just migrated my library from v13 to v14... If it's anything to do with MC, to the best of my recollection, it would be that I tried to move/rename files (in MC13, mind you, haven't tried it yet in MC14), was unable to choose or manually type in "(Install Drive)" as a valid target, then opting for X: instead as that is logically the same target, and then MC automatically "picking them up again" from the "(Install Drive)" resource as they'd still be in the default location as defined in settings... But I can't be 100%. I'll make sure to make note of it if it happens again though, and report back if so.
Logged

DanielBuus

  • Recent member
  • *
  • Posts: 30
Re: Expression bug with FileVolume() and portable install
« Reply #5 on: September 08, 2009, 01:00:48 pm »

You know, continuing to think about it, I do believe it's related to the fact that you can't specify "(Install Drive)" as a valid target. If you do so, you get something along the lines of "Directory doesn't exist, would you like to create it?"

Am I right to assume that the "(Install Drive)" volume is automagically used? Maybe if it were possible to select (Install Drive) in the dialogs that have to do with file repositories, this wouldn't happen? Like in Rename, Move, & Copy Files, I can't browse to a Base Path that begins with (Install Drive), and I can't write it manually either. If my install drive is X: and I'd like to move files from there, I have to explicitly write X:, and that changes the library values, too, even though the volume hasn't really changed?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41988
  • Shoes gone again!
Re: Expression bug with FileVolume() and portable install
« Reply #6 on: September 08, 2009, 01:19:52 pm »

You know, continuing to think about it, I do believe it's related to the fact that you can't specify "(Install Drive)" as a valid target. If you do so, you get something along the lines of "Directory doesn't exist, would you like to create it?"

Am I right to assume that the "(Install Drive)" volume is automagically used? Maybe if it were possible to select (Install Drive) in the dialogs that have to do with file repositories, this wouldn't happen? Like in Rename, Move, & Copy Files, I can't browse to a Base Path that begins with (Install Drive), and I can't write it manually either. If my install drive is X: and I'd like to move files from there, I have to explicitly write X:, and that changes the library values, too, even though the volume hasn't really changed?

The idea is that you use X:\ as a user, but the program switches it and stores it as (Install Drive):\ when appropriate.
Logged
Matt Ashland, JRiver Media Center

DanielBuus

  • Recent member
  • *
  • Posts: 30
Re: Expression bug with FileVolume() and portable install
« Reply #7 on: September 08, 2009, 01:38:20 pm »

Perhaps then this logic is applied when renaming (etc.) but not on-the-fly, "untriggered"? Because previously, trying to overcome some other issues with the expressions editor in the rename/movie dialog, I've created an expression field and then copied those values to the "Filename (path)" field using "Library Tools > Move / Copy Fields"...? This allowed me to use expressions for path renaming that were not otherwise possible with MC13. But if the "Exchange literal drive letter for '(Install Drive)' token where applicable" logic doesn't pick up on this indirect approach, then maybe this is why I ended up with duplicates in the end?

Either way, whatever it is, I'll make sure to report back if it happens again :)

Thanks
Logged
Pages: [1]   Go Up