Bug 35329 - Unable to rename a file with & in within the resources directory
Summary: Unable to rename a file with & in within the resources directory
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Project Model ()
Version: 5.10 (C6SR3)
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: (C8)
Assignee: Matt Ward
URL:
Depends on:
Blocks:
 
Reported: 2015-10-28 10:32 UTC by Paul Johnson
Modified: 2016-06-30 07:03 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Paul Johnson 2015-10-28 10:32:28 UTC
I've imported a file with a & in the filename. When I come to rename the file, the file vanishes and another takes it's place.

http://screencast.com/t/0qLo5LAW

This is part of a Xam.Forms project (though that shouldn't affect this)

=== Xamarin Studio ===

Version 5.10 (build 811)
Installation UUID: f3d1a29c-1ba2-4a83-a193-1087efe91a85
Runtime:
	Mono 4.2.1 (explicit/804ddbc)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010060

=== Xamarin.Profiler ===

Not Installed

=== Apple Developer Tools ===

Xcode 7.1 (9079)
Build 7B91b

=== Xamarin.Mac ===

Version: 2.4.0.79 (Starter Edition)

=== Xamarin.Android ===

Version: 6.0.0.8 (Business Edition)
Android SDK: /Users/PFJ/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 24.3.4
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.1

Java SDK: /usr
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

=== Xamarin Android Player ===

Version: 0.4.4
Location: /Applications/Xamarin Android Player.app

=== Xamarin.iOS ===

Version: 9.2.0.84 (Business Edition)
Hash: b5396c2
Branch: master
Build date: 2015-09-30 15:22:15-0400

=== Build Information ===

Release ID: 510000811
Git revision: 34cd31ea72536afab530c14d9220b286075e83cd
Build date: 2015-09-30 10:40:37-04
Xamarin addins: 8e6fccfc0c19a7e0b7b11be925f09751d827eb5c
Build lane: monodevelop-lion-cycle6

=== Operating System ===

Mac OS X 10.11.1
Darwin Pauls-iMac.local 15.0.0 Darwin Kernel Version 15.0.0
    Sat Sep 19 15:53:46 PDT 2015
    root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2015-11-16 22:02:01 UTC
## Preliminary regression testing: does not appear to be an immediate regression

> BAD: Xamarin Studio 5.10  (build 870) (1212ecb) + Xamarin.Android 6.0.0.34 (3efa14c)
> BAD: Xamarin Studio 5.10  (build 870) (1212ecb) + Xamarin.Android 5.1.9.0  (f7b9e87)
> BAD: Xamarin Studio 5.9.8 (build 0)   (cc5f6e5) + Xamarin.Android 5.1.9.0  (f7b9e87)

(All tested on Mono 4.2.1 (explicit/6dd2d0d) + OS X 10.10.5)




## Additional notes

This problem appears to be easiest to reproduce when the file is located in the Resources folder of a Xamarin.Android. I was able to reproduce the problem:

1. Duplicate the "icon.png" file from the "Resources/drawable" folder of a new from template Xamarin.Forms Android app.

2. Rename the duplicate file using Terminal or Finder to "Foo & Bar.png".

3. Add the renamed file into the project.

4. Control-click the file name in the Solution pad and select "Rename".


(Renaming a file that contains an ampersand in a Xamarin.iOS project or in the top level of a Xamarin.Android project does appear to have a similar behavior: the file name "flashes" temporarily as a different name immediately after starting the rename command, but then it usually switches back quickly to the correct name.)
Comment 2 Rajneesh Kumar 2015-11-20 08:36:12 UTC
I have checked this issue and able to reproduce this. To reproduce this issue I have followed the steps mentioned below:

Steps I followed:

1. Create a Xamarin.Forms application.
2. Import some file with a & in the filename.
3. Try to rename the file.
4. Observed that on renaming it goes in editable mode and shows Project name with .iOS extension.

Screencast: http://www.screencast.com/t/up4jKy9It

Please let me know if I am doing something wrong to reproduce this issue.

Thanks..!

Ide Logs: https://gist.github.com/Rajneesh360Logica/c228517a9febf9f9e7e2

Environment Info:

=== Xamarin Studio ===

Version 5.10 (build 872)
Installation UUID: 0b7eaebc-a0ed-4b58-81df-91e378cad28c
Runtime:
	Mono 4.2.1 (explicit/6dd2d0d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010102

=== Xamarin.Profiler ===

Version: 0.0.0.0
Location: /Applications/XamarinProfiler.Mac.app/Contents/MacOS/XamarinProfiler.Mac

=== Apple Developer Tools ===

Xcode 7.1 (9079)
Build 7B91b

=== Xamarin.Mac ===

Version: 2.4.0.109 (Trial Edition)

=== Xamarin.iOS ===

Version: 9.2.1.48 (Trial Edition)
Hash: 62c70ea
Branch: master
Build date: 2015-11-09 19:01:07-0500

=== Xamarin.Android ===

Version: 6.0.0.33 (Trial Edition)
Android SDK: /Android SDK/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		6.0    (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.1

Java SDK: /usr
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

=== Xamarin Android Player ===

Version: 0.6.1
Location: /Applications/Xamarin Android Player.app

=== Build Information ===

Release ID: 510000872
Git revision: 18af1ba26343fb73877cc8081a808e3100fa00e5
Build date: 2015-11-18 05:58:59-05
Xamarin addins: 7d8e6d12fd79bb0a3ebe4f6f0d0ad7c984c2ad88
Build lane: monodevelop-lion-cycle6

=== Operating System ===

Mac OS X 10.11.0
Darwin Admin-Macs-Mac-mini.local 15.0.0 Darwin Kernel Version 15.0.0
    Wed Aug 26 16:57:32 PDT 2015
    root:xnu-3247.1.106~1/RELEASE_X86_64 x86_64
Comment 3 xamarin-release-manager 2016-06-29 14:31:28 UTC
Fixed in version 6.1.0.5078 (master)

Author: Matt Ward
Commit: 2bc289d4dfa42bafc85dfc657ad6d86ad1ca1f71 (mono/monodevelop)
Comment 4 Danish Akhtar 2016-06-30 07:03:56 UTC
I have checked this issue with latest master XS 6.1(build 5078) and observed that now this issue is not exits. We are successfully able to rename a file with & in within the resources directory for Xamarin.Forms application.

Here is the screencast for the same: http://www.screencast.com/t/9e8Hbwpq

Hence closing this issue.