English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 21 March 2017, 22:25   #1
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 40
Posts: 8,992
Bug when a comma is used in a directory plus .HDF name...

Heya Toni,

No big deal but thought I'd mention anyway...

Tonight I setup "Simon the Sorcerer II - The Lion, the Wizard and the Wardrobe [AGA]"

The "Simon the Sorcerer II - The Lion, the Wizard and the Wardrobe AGA.hdf" sits in a directory named "Simon the Sorcerer II - The Lion, the Wizard and the Wardrobe AGA".

No matter what I do the game won't see the .HDF and start correctly

It's not until I remove the ',' from both the directory name and .HDF name then all works fine...
DamienD is online now  
AdSense AdSense  
Old 22 March 2017, 21:06   #2
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 40
Posts: 8,992
Heya Toni,

Thought I better attach the problem configuration file (which points to a directory and a .HDF that have commas in the name).

I get what the issue most probably is, commas are used in the following lines to set option. Guess that's throwing everything off:

Code:
hardfile2=rw,DH0:
uaehf0=hdf,rw,DH0:
Anyway, again not really that big a deal...

It's the only game / configuration file that has commas in it and of course to get it working I just removed these from the directory and .HDF
DamienD is online now  
Old 23 March 2017, 18:39   #3
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Posts: 442
I'm reminded of how MS-DOS (still used in Command Prompt in Win7, for example) insists that users use quote marks (") around filenames with spaces in them, to prevent errors when it comes to entering commands. The principle is that quote marks are not allowed in filenames.

If quote marks (") are also not allowed in Amiga filenames, then simply putting the filename of the HDF (for example) in quote marks should solve the problem easily.
Foebane is offline  
Old 23 March 2017, 19:41   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,564
Those "old style" directory/hardfile paths (that are still in use) didn't have any escaping support. It will be supported in next version. (Special case escape, only escape if string contains "," to keep backwards compatibility)
Toni Wilen is online now  
Old 23 March 2017, 19:47   #5
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 40
Posts: 8,992
Quote:
Originally Posted by Foebane View Post
I'm reminded of how MS-DOS (still used in Command Prompt in Win7, for example) insists that users use quote marks (") around filenames with spaces in them, to prevent errors when it comes to entering commands. The principle is that quote marks are not allowed in filenames.

If quote marks (") are also not allowed in Amiga filenames, then simply putting the filename of the HDF (for example) in quote marks should solve the problem easily.
Already tried that before starting the thread

Here are the full lines in the configuration file (comma removed as this is my working configuration file and added a gap between lines below for easy reading):

Quote:
hardfile2=rw,DH0:.\Games\Simon the Sorcerer II - The Lion the Wizard and the Wardrobe AmigaCD\Simon the Sorcerer II - The Lion the Wizard and the Wardrobe AmigaCD.hdf,32,1,2,512,0,,uae

uaehf0=hdf,rw,DH0:".\\Games\\Simon the Sorcerer II - The Lion the Wizard and the Wardrobe AmigaCD\\Simon the Sorcerer II - The Lion the Wizard and the Wardrobe AmigaCD",32,1,2,512,0,,uae
The 2nd line already has quotes around it by default when saving the configuration file. Tried doing the same with 1st line but doesn't fix it.
DamienD is online now  
Old 23 March 2017, 19:51   #6
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 40
Posts: 8,992
Quote:
Originally Posted by Toni Wilen View Post
Those "old style" directory/hardfile paths (that are still in use) didn't have any escaping support. It will be supported in next version. (Special case escape, only escape if string contains "," to keep backwards compatibility)
Cool Toni, appreciate your efforts as always.

...I only hope you're not doing this just because of this one report. It's no big deal, out of 1672 games / configs this is the only one with a comma.
DamienD is online now  
Old 23 March 2017, 19:59   #7
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 40
Posts: 8,992
Oh, I updated the title thread because I would say it's related to the .HDF lines.

I do have .ADF games that have commas in the filenames and these work
DamienD is online now  
Old 23 March 2017, 20:22   #8
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Posts: 442
Quote:
Originally Posted by DamienD View Post
Already tried that before starting the thread
Sorry, I didn't make it clear: What I meant is that when an MS-DOS command line has the command, parameters and path(s) with spaces inbetween them, then surrounding each path in quotes prevents errors when the paths have spaces in them as well.

I didn't say that WinUAE would do the same thing in .uae files.
Foebane is offline  
Old 23 March 2017, 20:26   #9
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Posts: 442
Quote:
Originally Posted by DamienD View Post
out of 1672 games / configs this is the only one with a comma.
Tell me, DamienD: have you considered WHDLoad? I have dozens of WHDLoad games, they don't need HDFs and they all work with just one config. I got all my games from a website that has them all ready-made, ready to run. I highly recommend it.
Foebane is offline  
Old 23 March 2017, 20:31   #10
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,564
Quote:
Originally Posted by DamienD View Post
...I only hope you're not doing this just because of this one report. It's no big deal, out of 1672 games / configs this is the only one with a comma.
Yes, only because of your report

Simple: it was wrong, "," is perfectly valid file name character. (It didn't work because config files use "," as a config entry separator)
Toni Wilen is online now  
Old 23 March 2017, 20:48   #11
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Posts: 442
Quote:
Originally Posted by Toni Wilen View Post
Simple: it was wrong, "," is perfectly valid file name character. (It didn't work because config files use "," as a config entry separator)
As I've been trying to explain to DamienD with the MS-DOS example
Foebane is offline  
Old 23 March 2017, 21:09   #12
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 40
Posts: 8,992
Quote:
Originally Posted by Toni Wilen View Post
Simple: it was wrong, "," is perfectly valid file name character. (It didn't work because config files use "," as a config entry separator)
Exactly what I figured
DamienD is online now  
Old 23 March 2017, 21:21   #13
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 40
Posts: 8,992
Quote:
Originally Posted by Foebane View Post
Sorry, I didn't make it clear: What I meant is that when an MS-DOS command line has the command, parameters and path(s) with spaces inbetween them, then surrounding each path in quotes prevents errors when the paths have spaces in them as well.

I didn't say that WinUAE would do the same thing in .uae files.
Trust me, I know MS-DOS pretty well and have written some killer batch files

For example see my two old threads:

... DamienD's SNES DVD...
... DamienD's SNES DVD... [REVAMP]

Anyway, I do know about putting quotes around directories / file names in MS-DOS

Quote:
Originally Posted by Foebane View Post
As I've been trying to explain to DamienD with the MS-DOS example
Quotes don't fix this issue inside of the configuration file and as previously mentioned in post #5 that was the first thing I tried before creating the thread...
DamienD is online now  
Old 23 March 2017, 21:28   #14
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 40
Posts: 8,992
Quote:
Originally Posted by Foebane View Post
Tell me, DamienD: have you considered WHDLoad? I have dozens of WHDLoad games, they don't need HDFs and they all work with just one config. I got all my games from a website that has them all ready-made, ready to run. I highly recommend it.
I do setup / use WHDLoad games sometimes... Thing is, requires sooooo much RAM and there are compatibility issues with some games / setups.

I prefer to use .ADFs (love old school cracktros), .IPFs and installing games to plain or vanilla WB3.1 .HDFs also.
DamienD is online now  
Old 23 March 2017, 21:41   #15
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Posts: 442
Quote:
Originally Posted by DamienD View Post
Quotes don't fix this issue inside of the configuration file
Perhaps they COULD, that's what I've been trying to say. Maybe something for Toni to consider...?

EDIT: Then again, maybe not. I was just able to create a new folder in Workbench with quotes, a question mark and an asterisk in the name, all things illegal in MS-DOS filenames. WTF?

Last edited by Foebane; 23 March 2017 at 21:51.
Foebane is offline  
Old 23 March 2017, 21:44   #16
Foebane
Registered User
 
Join Date: Sep 2011
Location: Cardiff, UK
Posts: 442
Quote:
Originally Posted by DamienD View Post
I prefer to use .ADFs (love old school cracktros), .IPFs and installing games to plain or vanilla WB3.1 .HDFs also.
Fair enough. However, IMHO, cracktros are a reminder of illegal activity, with the cracks and hacks and trainers. I'm glad these talented people turned to creative and legal methods that resulted in the Demoscene.
Foebane is offline  
Old 24 March 2017, 01:12   #17
Pat the Cat
Banned

 
Join Date: Dec 2016
Location: Nottingham, UK
Posts: 482
Filenames with commas in them have been breaking scripts in operating systems since.. before I was born, probably.

Punctuation marks generally, but the comma is a classic.
Pat the Cat is offline  
Old 26 March 2017, 16:26   #18
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 40
Posts: 8,992
Quote:
Originally Posted by Toni Wilen View Post
- Escape old style directory and hardfile paths if it contains "," (which is config file separator)
Heya Toni,

Just tested this and it works

I did have to re-add the .HDF and then save the configuration. The new lines now look like this (added a gap between lines below for easy reading):

Quote:
hardfile2=rw,DH0:".\\Games\\Simon the Sorcerer II - The Lion, the Wizard and the Wardrobe AmigaCD\\Simon the Sorcerer II - The Lion, the Wizard and the Wardrobe AmigaCD.hdf",32,1,2,512,0,,uae

uaehf0=hdf,rw,DH0:".\\Games\\Simon the Sorcerer II - The Lion, the Wizard and the Wardrobe AmigaCD\\Simon the Sorcerer II - The Lion, the Wizard and the Wardrobe AmigaCD.hdf",32,1,2,512,0,,uae
DamienD is online now  
Old 26 March 2017, 16:36   #19
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 2,985
Quote:
Originally Posted by DamienD View Post
I do setup / use WHDLoad games sometimes... Thing is, requires sooooo much RAM
Unlike your ADF hacks that depack themselves into RAM?
idrougge is offline  
Old 26 March 2017, 17:08   #20
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 40
Posts: 8,992
Quote:
Originally Posted by idrougge View Post
Unlike your ADF hacks that depack themselves into RAM?
Yes, but much less RAM required and as others have pointed out, they don't need to install and possibly change existing Libs that could break their systems.

...but this is why I don't get you're problem with these. Similar priniciple to WHDLoad in terms of loading everything into RAM.

Just take a look at the Nuxelia (playable-demo) (AGA)[unreleased] - "HD install" --> "ADF" thread... 29 downloads for the "HD install" --> "ADF" file versus 9 downloads for the .HDF file. I bet you must find it strange that this floppy version seems more popular?

Anyway, another pretty pointless post from you and obviously in order to try to get a reaction from me. Don't bother replying, I'll just delete it
DamienD is online now  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bug with shared-directory+Winuae/OS41FE thellier support.WinUAE 1 11 August 2016 21:45
Converting between directory and .hdf emulated hard disks. vext01 support.FS-UAE 2 06 February 2013 18:16
Directory drive and hdf compatibility yaromir support.WinUAE 2 23 September 2011 11:34

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 20:18.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.30413 seconds with 12 queries