Skip to content

Commit

Permalink
Fixed issue with get_real_case usage on case sensitive systems (Linux)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrodeSolheim committed Jul 31, 2015
1 parent 8718322 commit 79d5afd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions ChangeLog
@@ -1,5 +1,6 @@
Version 2.5.33dev:

* Fixed issue with get_real_case usage on case sensitive systems (Linux).
* Login / logout entries in main menu did not update correctly.
* Redesigned model selection GUI (more room for additional models / presets).
* Do not write empty FS-UAE config values (less noise in the logs).
Expand Down
11 changes: 9 additions & 2 deletions fsbc/Paths.py
@@ -1,7 +1,7 @@
import os
import sys
import unicodedata
from fsbc.system import macosx
from fsbc.system import windows, macosx
from fsbc.user import get_home_dir
from fsbc.util import memoize

Expand Down Expand Up @@ -102,7 +102,14 @@ def get_real_case(cls, path):
"""Check the case for the (case insensitive) path. Used to make the
database portable across sensitive/insensitive file systems."""

# not really needed on Linux
# get_real_case will fail on Linux if you have "conflicting" paths
# (differing only by case), unless we check that the specified path
# is already correct. The reason for not simply returning the path
# as-is on Linux, is that this function can find files in directories
# (portable version) when the directory is specified with wrong case.
if not windows and not macosx:
if os.path.exists(path):
return path

parts = []
drive, p = os.path.splitdrive(path)
Expand Down

0 comments on commit 79d5afd

Please sign in to comment.