mirror of
https://github.com/akuker/RASCSI.git
synced 2026-04-21 02:17:25 +00:00
Fix handling of properties files when they're in subdirs (#1082)
- File operation class methods create parent dirs if they don't exist - Avoid stripping path from file names in several places - Simplify prop file matching logic: check for existence of file - Remove list_files() method which is now unused
This commit is contained in:
@@ -389,7 +389,7 @@ def drive_create():
|
||||
Creates the image and properties file pair
|
||||
"""
|
||||
drive_name = request.form.get("drive_name")
|
||||
file_name = Path(request.form.get("file_name")).name
|
||||
file_name = Path(request.form.get("file_name"))
|
||||
|
||||
properties = get_properties_by_drive_name(APP.config["PISCSI_DRIVE_PROPERTIES"], drive_name)
|
||||
|
||||
@@ -432,7 +432,7 @@ def drive_cdrom():
|
||||
Creates a properties file for a CD-ROM image
|
||||
"""
|
||||
drive_name = request.form.get("drive_name")
|
||||
file_name = Path(request.form.get("file_name")).name
|
||||
file_name = Path(request.form.get("file_name"))
|
||||
|
||||
# Creating the drive properties file
|
||||
file_name = f"{file_name}.{PROPERTIES_SUFFIX}"
|
||||
|
||||
Reference in New Issue
Block a user