Changeset View
Changeset View
Standalone View
Standalone View
src/core/support/Amarok.cpp
Show First 20 Lines • Show All 331 Lines • ▼ Show 20 Line(s) | 327 | { | |||
---|---|---|---|---|---|
332 | } | 332 | } | ||
333 | result[ i ] = c; | 333 | result[ i ] = c; | ||
334 | } | 334 | } | ||
335 | return result; | 335 | return result; | ||
336 | } | 336 | } | ||
337 | 337 | | |||
338 | QString vfatPath( const QString &path, PathSeparatorBehaviour behaviour ) | 338 | QString vfatPath( const QString &path, PathSeparatorBehaviour behaviour ) | ||
339 | { | 339 | { | ||
340 | if( path.isEmpty() ) | ||||
341 | return QString(); | ||||
342 | | ||||
340 | QString s = path; | 343 | QString s = path; | ||
341 | 344 | | |||
342 | QChar separator = ( behaviour == AutoBehaviour ) ? QDir::separator() : ( behaviour == UnixBehaviour ) ? '/' : '\\'; | 345 | QChar separator = ( behaviour == AutoBehaviour ) ? QDir::separator() : ( behaviour == UnixBehaviour ) ? '/' : '\\'; | ||
343 | 346 | | |||
344 | if( behaviour == UnixBehaviour ) // we are on *nix, \ is a valid character in file or directory names, NOT the dir separator | 347 | if( behaviour == UnixBehaviour ) // we are on *nix, \ is a valid character in file or directory names, NOT the dir separator | ||
345 | s.replace( '\\', '_' ); | 348 | s.replace( '\\', '_' ); | ||
346 | else | 349 | else | ||
347 | s.replace( '/', '_' ); // on windows we have to replace / instead | 350 | s.replace( '/', '_' ); // on windows we have to replace / instead | ||
▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines |