backslash should not be path-sep when using swiftclient under windows

Bug #1511813 reported by Dirk Petersen
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python-swiftclient
In Progress
Medium
James Nzomo

Bug Description

When I use python-swiftclient under windows (v. 2.60 Python 3.4 x64), the path separator for pseudo folders is a backslash

muh\viostor\w8.1\amd64\viostor.sys
muh\viostor\w8.1\x86\viostor.cat
muh\viostor\w8.1\x86\viostor.inf
muh\viostor\w8.1\x86\viostor.pdb
muh\viostor\w8.1\x86\viostor.sys
muh\viostor\w8\amd64\viostor.cat
muh\viostor\w8\amd64\viostor.inf
muh\viostor\w8\amd64\viostor.pdb

I am not sure if this behavior was intended but it will break every other GUI client trying to access the data uploaded using the python swift client.

perhaps os.sep should be set to '/' when initially walking through the file system.

Revision history for this message
Dirk Petersen (q-petersen) wrote :

os.sep or os.path.sep appear to be read only?

this hack works for me but there may be more elegant ways:

https://github.com/FredHutch/python-swiftclient/commit/57ecf5034b1f58566fe06b6ddfde3d932dbf207b

Changed in python-swiftclient:
assignee: nobody → sanket lawangare (sanket-lawangare-d)
Revision history for this message
Matt Hanlon (matthanlon) wrote :

I don't think this bug involves needing to change the path separator. Rather paths for upload should not be constructed with os.join, they should always use "/" as the separator even on windows.

This issue renders python-swiftclient command line rather useless on windows.

Changed in python-swiftclient:
assignee: sanket lawangare (sanket-lawangare-d) → nobody
Changed in python-swiftclient:
importance: Undecided → Medium
Revision history for this message
Christian Schwede (cschwede) wrote :

There is already a patch up for review: https://review.openstack.org/#/c/241064/

Changed in python-swiftclient:
status: New → Confirmed
James Nzomo (moje)
Changed in python-swiftclient:
assignee: nobody → James Nzomo (moje)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-swiftclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/281700

Changed in python-swiftclient:
status: Confirmed → In Progress
Revision history for this message
Dirk Petersen (q-petersen) wrote :

Any desire to move this one along. Just tested the latest swift client and it seems my ol hack from last year is still required.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.