mirror of
https://github.com/ksherlock/prez.git
synced 2024-06-02 03:41:33 +00:00
sys.platform="msys" compatibility.
This commit is contained in:
parent
fb278a19ab
commit
bfb1d296cc
|
@ -85,7 +85,7 @@ if sys.platform == "win32":
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
if sys.platform == "darwin":
|
elif sys.platform == "darwin":
|
||||||
def open_rfork(file, mode="r"):
|
def open_rfork(file, mode="r"):
|
||||||
file = os.path.realpath(file)
|
file = os.path.realpath(file)
|
||||||
rfile = file + "/..namedfork/rsrc"
|
rfile = file + "/..namedfork/rsrc"
|
||||||
|
@ -106,7 +106,7 @@ if sys.platform == "darwin":
|
||||||
if ok < 0: return False
|
if ok < 0: return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if sys.platform == "linux":
|
elif sys.platform == "linux":
|
||||||
def open_rfork(file, mode="r"):
|
def open_rfork(file, mode="r"):
|
||||||
raise NotImplementedError("open_rfork")
|
raise NotImplementedError("open_rfork")
|
||||||
|
|
||||||
|
@ -115,3 +115,10 @@ if sys.platform == "linux":
|
||||||
data = struct.pack(">8s24x", _make_finder_data(filetype, auxtype))
|
data = struct.pack(">8s24x", _make_finder_data(filetype, auxtype))
|
||||||
os.setxattr(path, "com.apple.FinderInfo", data, 0, 0)
|
os.setxattr(path, "com.apple.FinderInfo", data, 0, 0)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
else:
|
||||||
|
def open_rfork(file, mode="r"):
|
||||||
|
raise NotImplementedError("open_rfork")
|
||||||
|
|
||||||
|
def set_file_type(path, filetype, auxtype):
|
||||||
|
raise NotImplementedError("set_file_type")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user